diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-10-15 14:59:36 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-10-15 14:59:43 -0400 |
commit | a3af5b5c13f7334f1874f77c4d1e9052fc705e22 (patch) | |
tree | ebb294bc4594a1c9cb31fe0d1200950eb61f4d37 /src/interfaces/chain.cpp | |
parent | e180be49d7d802d05b1850924be97fe27d353ffe (diff) | |
parent | b96ed0396294fc4fa89d83ceab6bc169dd09f002 (diff) | |
download | bitcoin-a3af5b5c13f7334f1874f77c4d1e9052fc705e22.tar.xz |
Merge #17138: Remove wallet access to some node arguments
b96ed0396294fc4fa89d83ceab6bc169dd09f002 [wallet] Remove pruning check for -rescan option (John Newbery)
eea462de9c652dca556ad241d2126b10790f67f8 [wallet] Remove package limit config access from wallet (John Newbery)
Pull request description:
Removes wallet access to `-limitancestorcount`, `-limitdescendantcount` and `-prune`:
- `-limitancestorcount` and `-limitdescendantcount` are now accessed with a method `getPackageLimits` in the `Chain` interface.
- `-prune` is not required. It was only used in wallet component initiation to prevent running `-rescan` when pruning was enabled. This check is not required.
Partially addresses #17137.
ACKs for top commit:
MarcoFalke:
Tested ACK b96ed0396294fc4fa89d83ceab6bc169dd09f002
ryanofsky:
Code review ACK b96ed0396294fc4fa89d83ceab6bc169dd09f002
promag:
Code review ACK b96ed0396294fc4fa89d83ceab6bc169dd09f002.
ariard:
ACK b96ed03, check there isn't left anymore wallet access to node arguments.
Tree-SHA512: 90c8e3e083acbd37724f1bccf63dab642cf9ae95cc5e684872a67443ae048b4fdbf57b52ea47c5a1da6489fd277278fe2d9bbe95e17f3d4965a1a0fbdeb815bf
Diffstat (limited to 'src/interfaces/chain.cpp')
-rw-r--r-- | src/interfaces/chain.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index b8b9ecded9..b7cd65ff3a 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; |