From faa86eeb418ac5a28e7c4aa6cd13f607e151fad8 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 5 Jan 2023 19:52:52 +0100 Subject: refactor: Work around Werror=free-nonheap-object in AssumeCalculateMemPoolAncestors --- src/txmempool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/txmempool.cpp') diff --git a/src/txmempool.cpp b/src/txmempool.cpp index c2a8ed0e27..aa04f8a4d0 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -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); } -- cgit v1.2.3