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

This commit is contained in:
MarcoFalke committed 2023-01-05 19:48:14 +01:00
1 parent 3212d104f4
commit faa86eeb41
1 file changed
+2 -2
+2 -2
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);
}