mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 16:36:04 +01:00
Merge bitcoin/bitcoin#33183: validation: rename block script verification error from "mandatory" to "block"
c0d91fc69cAdd release note for #33050 and #33183 error string changes (Antoine Poinsot)b3f781a0efcontrib: adapt max reject string size in tracing demo (Antoine Poinsot)9a04635432scripted-diff: validation: rename mandatory errors into block errors (Antoine Poinsot) Pull request description: This is a followup to #33050 now that it's merged. Using "block"/"mempool" as the error reason is clearer to a user than "mandatory"/"non-mandatory". The "non-mandatory" errors got renamed to "mempool" in #33050 (see https://github.com/bitcoin/bitcoin/pull/33050#discussion_r2230103371). This takes care of the second part of the renaming. ACKs for top commit: fjahr: utACKc0d91fc69cdavidgumberg: lgtm ACKc0d91fc69cajtowns: utACKc0d91fc69cCrypt-iQ: utACKc0d91fc69cjanb84: utACKc0d91fc69cinstagibbs: ACKc0d91fc69cTree-SHA512: b463e633c57dd1eae7c49d23239a59066a672f355142ec194982eddc927a7646bc5cde583dc8d6f45075bf5cbb96dbe73f7e339e728929b0eff356b674d1b68c
This commit is contained in:
@@ -450,7 +450,7 @@ void MinerTestingSetup::TestBasicMining(const CScript& scriptPubKey, const std::
|
||||
tx.vout[0].nValue -= LOWFEE;
|
||||
hash = tx.GetHash();
|
||||
AddToMempool(tx_mempool, entry.Fee(LOWFEE).Time(Now<NodeSeconds>()).SpendsCoinbase(false).FromTx(tx));
|
||||
BOOST_CHECK_EXCEPTION(mining->createNewBlock(options), std::runtime_error, HasReason("mandatory-script-verify-flag-failed"));
|
||||
BOOST_CHECK_EXCEPTION(mining->createNewBlock(options), std::runtime_error, HasReason("block-script-verify-flag-failed"));
|
||||
|
||||
// Delete the dummy blocks again.
|
||||
while (m_node.chainman->ActiveChain().Tip()->nHeight > nHeight) {
|
||||
|
||||
@@ -2200,7 +2200,7 @@ bool CheckInputScripts(const CTransaction& tx, TxValidationState& state,
|
||||
if (flags & STANDARD_NOT_MANDATORY_VERIFY_FLAGS) {
|
||||
return state.Invalid(TxValidationResult::TX_NOT_STANDARD, strprintf("mempool-script-verify-flag-failed (%s)", ScriptErrorString(result->first)), result->second);
|
||||
} else {
|
||||
return state.Invalid(TxValidationResult::TX_CONSENSUS, strprintf("mandatory-script-verify-flag-failed (%s)", ScriptErrorString(result->first)), result->second);
|
||||
return state.Invalid(TxValidationResult::TX_CONSENSUS, strprintf("block-script-verify-flag-failed (%s)", ScriptErrorString(result->first)), result->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2674,7 +2674,7 @@ bool Chainstate::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
||||
if (control) {
|
||||
auto parallel_result = control->Complete();
|
||||
if (parallel_result.has_value() && state.IsValid()) {
|
||||
state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, strprintf("mandatory-script-verify-flag-failed (%s)", ScriptErrorString(parallel_result->first)), parallel_result->second);
|
||||
state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, strprintf("block-script-verify-flag-failed (%s)", ScriptErrorString(parallel_result->first)), parallel_result->second);
|
||||
}
|
||||
}
|
||||
if (!state.IsValid()) {
|
||||
|
||||
Reference in New Issue
Block a user