aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-05-21 12:37:44 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-06-11 19:04:55 +0900
commit46847d69d2c1cc908fd779daac7884e365955dbd (patch)
tree03b2ab8a66fcf7a3f09f99d087faaed4ba0d7e75 /src/txmempool.h
parentb9ef21dd727dde33f5bd3c33226b05d07eb12aac (diff)
mempool: Fix max descendants check
The chain limits check for max descendants would check the descendants of the transaction itself even though the description for -limitdescendantcount says 'any ancestor'. This commit corrects the descendant count check by finding the top parent transaction in the mempool and comparing against that.
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index f6792b0968..b60c2c50b1 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -498,6 +498,7 @@ public:
const setEntries & GetMemPoolParents(txiter entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
const setEntries & GetMemPoolChildren(txiter entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
+ uint64_t CalculateDescendantMaximum(txiter entry) const EXCLUSIVE_LOCKS_REQUIRED(cs);
private:
typedef std::map<txiter, setEntries, CompareIteratorByHash> cacheMap;