diff options
author | stickies-v <stickies-v@protonmail.com> | 2022-10-09 17:19:06 +0100 |
---|---|---|
committer | stickies-v <stickies-v@protonmail.com> | 2022-12-13 15:42:49 +0000 |
commit | f911bdfff95eba3793fffaf71a31cc8bfc6f80c9 (patch) | |
tree | 3ea4d4ae42f038409ccf60af7e7c267bcc1305fa /src/txmempool.h | |
parent | 66e028f7399b6511f9b73b1cef54b6a6ac38a024 (diff) |
mempool: use util::Result for CalculateMemPoolAncestors
Avoid using setAncestors outparameter, simplify function signatures
and avoid creating unused dummy strings.
Diffstat (limited to 'src/txmempool.h')
-rw-r--r-- | src/txmempool.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index 396c84cb19..14b0dc3871 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -555,20 +555,15 @@ public: * (these are all calculated including the tx itself) * * @param[in] entry CTxMemPoolEntry of which all in-mempool ancestors are calculated - * @param[out] setAncestors Will be populated with all mempool ancestors. * @param[in] limits Maximum number and size of ancestors and descendants - * @param[out] errString Populated with error reason if any limits are hit * @param[in] fSearchForParents Whether to search a tx's vin for in-mempool parents, or look * up parents from mapLinks. Must be true for entries not in * the mempool * - * @return true if no limits were hit and all in-mempool ancestors were calculated, false - * otherwise + * @return all in-mempool ancestors, or an error if any ancestor or descendant limits were hit */ - bool CalculateMemPoolAncestors(const CTxMemPoolEntry& entry, - setEntries& setAncestors, + util::Result<setEntries> CalculateMemPoolAncestors(const CTxMemPoolEntry& entry, const Limits& limits, - std::string& errString, bool fSearchForParents = true) const EXCLUSIVE_LOCKS_REQUIRED(cs); /** Calculate all in-mempool ancestors of a set of transactions not already in the mempool and |