Skip to content

Commit 40dc6d9

Browse files
Merge #6256: backport: bitcoin#23590, 23061, 23694
7d170bd Merge bitcoin#23694: doc: Add missing optional to MempoolEntryDescription (MarcoFalke) ed7ad7a Merge bitcoin#23061: Fix (inverse) meaning of -persistmempool (merge-script) f5f69ae Merge bitcoin#23590: Crash debug builds when mempool ConsensusScriptChecks fails (MarcoFalke) Pull request description: more bitcoin backports ACKs for top commit: UdjinM6: utACK 7d170bd PastaPastaPasta: utACK 7d170bd Tree-SHA512: 0332461598c9aa17476b591e98a2b3a952fcea0b7abbda604668b13745bf73268e0faba25a9338eabb8d27fe594c26804f8cc653c30c4f53e6b88f0f7fced287
2 parents 7701b8d + 7d170bd commit 40dc6d9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/rpc/blockchain.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,16 +458,16 @@ static RPCHelpMan getdifficulty()
458458

459459
static std::vector<RPCResult> MempoolEntryDescription() { return {
460460
RPCResult{RPCResult::Type::NUM, "vsize", "virtual transaction size. This can be different from actual serialized size for high-sigop transactions."},
461-
RPCResult{RPCResult::Type::STR_AMOUNT, "fee", "transaction fee in " + CURRENCY_UNIT + " (DEPRECATED)"},
462-
RPCResult{RPCResult::Type::STR_AMOUNT, "modifiedfee", "transaction fee with fee deltas used for mining priority (DEPRECATED)"},
461+
RPCResult{RPCResult::Type::STR_AMOUNT, "fee", /*optional=*/true, "transaction fee in " + CURRENCY_UNIT + " (DEPRECATED)"},
462+
RPCResult{RPCResult::Type::STR_AMOUNT, "modifiedfee", /*optional=*/true, "transaction fee with fee deltas used for mining priority (DEPRECATED)"},
463463
RPCResult{RPCResult::Type::NUM_TIME, "time", "local time transaction entered pool in " + UNIX_EPOCH_TIME},
464464
RPCResult{RPCResult::Type::NUM, "height", "block height when transaction entered pool"},
465465
RPCResult{RPCResult::Type::NUM, "descendantcount", "number of in-mempool descendant transactions (including this one)"},
466466
RPCResult{RPCResult::Type::NUM, "descendantsize", "size of in-mempool descendants (including this one)"},
467-
RPCResult{RPCResult::Type::STR_AMOUNT, "descendantfees", "modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)"},
467+
RPCResult{RPCResult::Type::STR_AMOUNT, "descendantfees", /*optional=*/true, "modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)"},
468468
RPCResult{RPCResult::Type::NUM, "ancestorcount", "number of in-mempool ancestor transactions (including this one)"},
469469
RPCResult{RPCResult::Type::NUM, "ancestorsize", "size of in-mempool ancestors (including this one)"},
470-
RPCResult{RPCResult::Type::STR_AMOUNT, "ancestorfees", "modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)"},
470+
RPCResult{RPCResult::Type::STR_AMOUNT, "ancestorfees", /*optional=*/true, "modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)"},
471471
RPCResult{RPCResult::Type::OBJ, "fees", "",
472472
{
473473
RPCResult{RPCResult::Type::STR_AMOUNT, "base", "transaction fee in " + CURRENCY_UNIT},

src/validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,8 @@ bool MemPoolAccept::ConsensusScriptChecks(const ATMPArgs& args, Workspace& ws, P
825825
// transactions into the mempool can be exploited as a DoS attack.
826826
unsigned int currentBlockScriptVerifyFlags = GetBlockScriptFlags(m_active_chainstate.m_chain.Tip(), chainparams.GetConsensus());
827827
if (!CheckInputsFromMempoolAndCache(tx, state, m_view, m_pool, currentBlockScriptVerifyFlags, txdata, m_active_chainstate.CoinsTip())) {
828-
return error("%s: BUG! PLEASE REPORT THIS! CheckInputScripts failed against latest-block but not STANDARD flags %s, %s",
829-
__func__, hash.ToString(), state.ToString());
828+
LogPrintf("BUG! PLEASE REPORT THIS! CheckInputScripts failed against latest-block but not STANDARD flags %s, %s\n", hash.ToString(), state.ToString());
829+
return Assume(false);
830830
}
831831

832832
return true;

test/functional/mempool_persist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def run_test(self):
154154
self.log.debug("Stop nodes, make node1 use mempool.dat from node0. Verify it has 6 transactions")
155155
os.rename(mempooldat0, mempooldat1)
156156
self.stop_nodes()
157-
self.start_node(1, extra_args=[])
157+
self.start_node(1, extra_args=["-persistmempool"])
158158
assert self.nodes[1].getmempoolinfo()["loaded"]
159159
assert_equal(len(self.nodes[1].getrawmempool()), 6)
160160

0 commit comments

Comments
 (0)