diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-07-28 19:45:45 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-02-22 15:43:02 -0400 |
commit | 1fb0a4a04e9cda19ed5ad04694a39c83c91b6072 (patch) | |
tree | 5b09b20818eea283c6fa782662f0fbef6ced776b /src/interfaces/chain.cpp | |
parent | cd32160af0528cc746968ee0eadf4f63c98665f2 (diff) |
Remove use of CalculateMemPoolAncestors in wallet code
This commit does not change behavior.
Diffstat (limited to 'src/interfaces/chain.cpp')
-rw-r--r-- | src/interfaces/chain.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index d7bad0543c..c12215cd60 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -200,6 +200,20 @@ public: { ::mempool.GetTransactionAncestry(txid, ancestors, descendants); } + bool checkChainLimits(CTransactionRef tx) override + { + LockPoints lp; + CTxMemPoolEntry entry(tx, 0, 0, 0, false, 0, lp); + CTxMemPool::setEntries ancestors; + auto limit_ancestor_count = gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT); + auto limit_ancestor_size = gArgs.GetArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT) * 1000; + auto limit_descendant_count = gArgs.GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT); + auto limit_descendant_size = gArgs.GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000; + std::string unused_error_string; + LOCK(::mempool.cs); + return ::mempool.CalculateMemPoolAncestors(entry, ancestors, limit_ancestor_count, limit_ancestor_size, + limit_descendant_count, limit_descendant_size, unused_error_string); + } }; } // namespace |