diff options
author | stickies-v <stickies-v@protonmail.com> | 2022-10-24 18:03:07 +0100 |
---|---|---|
committer | stickies-v <stickies-v@protonmail.com> | 2022-12-13 15:44:45 +0000 |
commit | 47c4b1f52ab8d95d7deef83050bad49d1e3e5990 (patch) | |
tree | c8054013efcefa3c56a03dd30752a3fec02e3654 /src/node | |
parent | 5481f65849313ff947f38433b1ac28285a7f7694 (diff) | |
download | bitcoin-47c4b1f52ab8d95d7deef83050bad49d1e3e5990.tar.xz |
mempool: log/halt when CalculateMemPoolAncestors fails unexpectedly
When CalculateMemPoolAncestors fails unexpectedly (e.g. it exceeds
ancestor/descendant limits even though we expect no limits to be applied),
add an error log entry for increased visibility. For debug builds,
the application will even halt completely since this is not supposed
to happen.
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/miner.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node/miner.cpp b/src/node/miner.cpp index e507c1381c..ddb304f210 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -394,8 +394,7 @@ void BlockAssembler::addPackageTxs(const CTxMemPool& mempool, int& nPackagesSele continue; } - auto ancestors_result{mempool.CalculateMemPoolAncestors(*iter, CTxMemPool::Limits::NoLimits(), /*fSearchForParents=*/false)}; - auto ancestors{std::move(ancestors_result).value_or(CTxMemPool::setEntries{})}; + auto ancestors{mempool.AssumeCalculateMemPoolAncestors(__func__, *iter, CTxMemPool::Limits::NoLimits(), /*fSearchForParents=*/false)}; onlyUnconfirmed(ancestors); ancestors.insert(iter); |