refactor: Work around Werror=free-nonheap-object in AssumeCalculateMemPoolAncestors

This commit is contained in:
MarcoFalke 2023-01-05 19:52:52 +01:00
parent 3212d104f4
commit faa86eeb41
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -260,8 +260,8 @@ CTxMemPool::setEntries CTxMemPool::AssumeCalculateMemPoolAncestors(
const Limits& limits,
bool fSearchForParents /* = true */) const
{
auto result{Assume(CalculateMemPoolAncestors(entry, limits, fSearchForParents))};
if (!result) {
auto result{CalculateMemPoolAncestors(entry, limits, fSearchForParents)};
if (!Assume(result)) {
LogPrintLevel(BCLog::MEMPOOL, BCLog::Level::Error, "%s: CalculateMemPoolAncestors failed unexpectedly, continuing with empty ancestor set (%s)\n",
calling_fn_name, util::ErrorString(result).original);
}