aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/feebumper.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-01-29 18:25:35 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-01-29 18:31:33 -0500
commitfaca18dcf499e36069ce5fcd3e02a5ee86639436 (patch)
tree5d720fffafaeced0b3f8551900e53747a8f30d0b /src/wallet/feebumper.cpp
parent718f05cab5fe632c5dc4e3c689d5e4cd51331089 (diff)
feebumper: Use PreconditionChecks to determine bump eligibility
Diffstat (limited to 'src/wallet/feebumper.cpp')
-rw-r--r--src/wallet/feebumper.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp
index e78095bf74..5234a69710 100644
--- a/src/wallet/feebumper.cpp
+++ b/src/wallet/feebumper.cpp
@@ -89,11 +89,15 @@ static feebumper::Result PreconditionChecks(const CWallet* wallet, const CWallet
namespace feebumper {
-bool TransactionCanBeBumped(CWallet* wallet, const uint256& txid)
+bool TransactionCanBeBumped(const CWallet* wallet, const uint256& txid)
{
LOCK2(cs_main, wallet->cs_wallet);
const CWalletTx* wtx = wallet->GetWalletTx(txid);
- return wtx && SignalsOptInRBF(*wtx->tx) && !wtx->mapValue.count("replaced_by_txid");
+ if (wtx == nullptr) return false;
+
+ std::vector<std::string> errors_dummy;
+ feebumper::Result res = PreconditionChecks(wallet, *wtx, errors_dummy);
+ return res == feebumper::Result::OK;
}
Result CreateTransaction(const CWallet* wallet, const uint256& txid, const CCoinControl& coin_control, CAmount total_fee, std::vector<std::string>& errors,