refactor: testBlockValidity make out argument last

This commit is contained in:
Sjors Provoost
2024-06-25 13:33:35 +02:00
parent 83a9bef0e2
commit 75ce7637ad
3 changed files with 6 additions and 5 deletions

View File

@@ -390,7 +390,7 @@ static RPCHelpMan generateblock()
LOCK(cs_main);
BlockValidationState state;
if (!miner.testBlockValidity(state, block, /*check_merkle_root=*/false)) {
if (!miner.testBlockValidity(block, /*check_merkle_root=*/false, state)) {
throw JSONRPCError(RPC_VERIFY_ERROR, strprintf("testBlockValidity failed: %s", state.ToString()));
}
}
@@ -713,7 +713,7 @@ static RPCHelpMan getblocktemplate()
return "inconclusive-not-best-prevblk";
}
BlockValidationState state;
miner.testBlockValidity(state, block);
miner.testBlockValidity(block, /*check_merkle_root=*/true, state);
return BIP22ValidationResult(state);
}