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/wallet/spend.cpp | |
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/wallet/spend.cpp')
-rw-r--r-- | src/wallet/spend.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index e97e658f38..b51cd6332f 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -1296,8 +1296,9 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal( if (gArgs.GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS)) { // Lastly, ensure this tx will pass the mempool's chain limits - if (!wallet.chain().checkChainLimits(tx)) { - return util::Error{_("Transaction has too long of a mempool chain")}; + auto result = wallet.chain().checkChainLimits(tx); + if (!result) { + return util::Error{util::ErrorString(result)}; } } |