mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user