Commit f959d9f
Fix masternode registration: collateral check used wrong amount + empty obfuscation dummy address
Masternodes could never register on FairCoin v3 (every `masternode start-alias` was silently rejected with "mnb - Rejected Masternode entry"). Two bugs in the collateral validation:
- CheckInputsAndAdd / CMasternodeBroadcast built the collateral-check dummy tx with a hardcoded 9999.99 COIN output (a PIVX 10000-collateral leftover), but FairCoin's collateral is MASTER_NODE_AMOUNT = 5000. So AcceptableInputs/CheckInputs failed with "value in (5000) < value out (9999.99)". Fixed to 4999.99 (collateral minus 0.01 fee margin) in all three sites: src/masternode.cpp:214, src/masternode.cpp:575, src/masternodeman.cpp:962.
- strObfuscationPoolDummyAddress was "" (empty) in chainparams (mainnet), so CObfuscationPool::SetCollateralAddress logged "Invalid Obfuscation collateral address" and collateralPubKey stayed empty. Set it to a valid FairCoin address (used only to build the never-broadcast collateral-check tx).
Verified in production: with both fixes, `masternode start-alias` is accepted ("Got NEW Masternode entry"), the masternode shows status ENABLED across all nodes, and blocks pay the masternode 5 FAIR with SPORK_8 enforcement on.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent dff0eeb commit f959d9f
3 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
| 575 | + | |
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
962 | | - | |
| 962 | + | |
963 | 963 | | |
964 | 964 | | |
965 | 965 | | |
| |||
0 commit comments