Skip to content

Commit 9174bcf

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#23590: Crash debug builds when mempool ConsensusScriptChecks fails
faad05c Crash debug builds when mempool ConsensusScriptChecks fails (MarcoFalke) Pull request description: Currently a bug in the function might sneak around our testing infrastructure. Fix that by turning bugs into crashes during tests. ACKs for top commit: glozow: utACK faad05c, there's something seriously wrong with the code if this returns false, good to throw in debug mode Tree-SHA512: dfea1cd9ce3f1c303f49cca1417cd5c77c6ed12849aaff7b6ab1b6060f2f0c9cf5d4689017355d11f66639bab35823f65f848e6979042fa875181509dfd5d3d7
2 parents c9d7d0a + faad05c commit 9174bcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,8 @@ bool MemPoolAccept::ConsensusScriptChecks(const ATMPArgs& args, Workspace& ws)
942942
unsigned int currentBlockScriptVerifyFlags = GetBlockScriptFlags(m_active_chainstate.m_chain.Tip(), chainparams.GetConsensus());
943943
if (!CheckInputsFromMempoolAndCache(tx, state, m_view, m_pool, currentBlockScriptVerifyFlags,
944944
ws.m_precomputed_txdata, m_active_chainstate.CoinsTip())) {
945-
return error("%s: BUG! PLEASE REPORT THIS! CheckInputScripts failed against latest-block but not STANDARD flags %s, %s",
946-
__func__, hash.ToString(), state.ToString());
945+
LogPrintf("BUG! PLEASE REPORT THIS! CheckInputScripts failed against latest-block but not STANDARD flags %s, %s\n", hash.ToString(), state.ToString());
946+
return Assume(false);
947947
}
948948

949949
return true;

0 commit comments

Comments
 (0)