diff options
author | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-11-24 19:28:14 +0100 |
---|---|---|
committer | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-12-17 21:13:44 +0100 |
commit | 8dec9c560b53488c1e71d8f74241c7dce42cb387 (patch) | |
tree | 6b9bb8441bcb33a957149339e8e1d4703328d920 /src/interfaces/chain.h | |
parent | 3695ecbf680a66b718f97d504308578d001eec49 (diff) | |
download | bitcoin-8dec9c560b53488c1e71d8f74241c7dce42cb387.tar.xz |
wallet, mempool: propagete `checkChainLimits` error message to wallet
Update CheckPackageLimits to use util::Result to pass the error message
instead of out parameter.
Also update test to reflect the error message from `CTxMempool`
`CheckPackageLimits` output.
Diffstat (limited to 'src/interfaces/chain.h')
-rw-r--r-- | src/interfaces/chain.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index aeb3797392..328399c4ad 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -8,6 +8,7 @@ #include <blockfilter.h> #include <common/settings.h> #include <primitives/transaction.h> // For CTransactionRef +#include <util/result.h> #include <functional> #include <memory> @@ -260,7 +261,7 @@ public: virtual void getPackageLimits(unsigned int& limit_ancestor_count, unsigned int& limit_descendant_count) = 0; //! Check if transaction will pass the mempool's chain limits. - virtual bool checkChainLimits(const CTransactionRef& tx) = 0; + virtual util::Result<void> checkChainLimits(const CTransactionRef& tx) = 0; //! Estimate smart fee. virtual CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc = nullptr) = 0; |