diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp index ff7a9f5a3ac..7f84c6fa668 100644 --- a/src/wallet/feebumper.cpp +++ b/src/wallet/feebumper.cpp @@ -80,9 +80,10 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CMutableTrans reused_inputs.push_back(txin.prevout); } - std::optional combined_bump_fee = wallet.chain().calculateCombinedBumpFee(reused_inputs, newFeerate); + const std::optional combined_bump_fee = wallet.chain().calculateCombinedBumpFee(reused_inputs, newFeerate); if (!combined_bump_fee.has_value()) { errors.push_back(Untranslated(strprintf("Failed to calculate bump fees, because unconfirmed UTXOs depend on an enormous cluster of unconfirmed transactions."))); + return feebumper::Result::WALLET_ERROR; } CAmount new_total_fee = newFeerate.GetFee(maxTxSize) + combined_bump_fee.value();