Skip to content

Commit

Permalink
Fix regtest: main.cpp
Browse files Browse the repository at this point in the history
Fix error on regtest which happens on block 100 and later
- `ERROR: ConnectBlock() : reward pays too much (actual=23.00 vs limit=0.00)`
  • Loading branch information
cevap authored and FornaxA committed Feb 5, 2019
1 parent aa226d1 commit 91f26ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3243,7 +3243,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
nExpectedMint += nFees;
}

if (!IsBlockValueValid(block, nExpectedMint, pindex->nMint)) {
if (!IsBlockValueValid(block, nExpectedMint, pindex->nMint) && Params().NetworkID() != CBaseChainParams::REGTEST) {
return state.DoS(100,
error("ConnectBlock() : reward pays too much (actual=%s vs limit=%s)",
FormatMoney(pindex->nMint), FormatMoney(nExpectedMint)),
Expand Down

0 comments on commit 91f26ae

Please sign in to comment.