aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/chain.cpp
diff options
context:
space:
mode:
authorJohn Newbery <[email protected]>2019-10-14 13:32:41 -0400
committerJohn Newbery <[email protected]>2019-10-14 13:32:41 -0400
commiteea462de9c652dca556ad241d2126b10790f67f8 (patch)
treea2744495dcb9580b02479c89e33e0b77ef194a45 /src/interfaces/chain.cpp
parentMerge #17124: test: speed up wallet_address_types by whitelisting peers (imme... (diff)
downloaddiscoin-eea462de9c652dca556ad241d2126b10790f67f8.tar.xz
discoin-eea462de9c652dca556ad241d2126b10790f67f8.zip
[wallet] Remove package limit config access from wallet
The wallet should not be able to directly access global configuration from the node. Remove access of "-limitancestorcount" and "-limitdescendantcount".
Diffstat (limited to 'src/interfaces/chain.cpp')
-rw-r--r--src/interfaces/chain.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index b8b9ecded..b7cd65ff3 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -298,6 +298,11 @@ public:
{
::mempool.GetTransactionAncestry(txid, ancestors, descendants);
}
+ void getPackageLimits(unsigned int& limit_ancestor_count, unsigned int& limit_descendant_count) override
+ {
+ limit_ancestor_count = gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT);
+ limit_descendant_count = gArgs.GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT);
+ }
bool checkChainLimits(const CTransactionRef& tx) override
{
LockPoints lp;