aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorGregory Sanders <gsanders87@gmail.com>2019-03-06 16:30:00 -0500
committerGregory Sanders <gsanders87@gmail.com>2019-04-11 07:21:49 -0400
commit0ea47ba7b38cc4b2b9175347cb5cd48fcd08da48 (patch)
tree18a1212973191aca891ece3bcfd52da9b89f467a /src/interfaces
parentc536dfbcb00fb15963bf5d507b7017c241718bf6 (diff)
generalize bumpfee to add inputs when needed
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/wallet.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index f98a49f9b1..ed73a71354 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -269,8 +269,13 @@ public:
CAmount& new_fee,
CMutableTransaction& mtx) override
{
- return feebumper::CreateTransaction(m_wallet.get(), txid, coin_control, total_fee, errors, old_fee, new_fee, mtx) ==
- feebumper::Result::OK;
+ if (total_fee > 0) {
+ return feebumper::CreateTotalBumpTransaction(m_wallet.get(), txid, coin_control, total_fee, errors, old_fee, new_fee, mtx) ==
+ feebumper::Result::OK;
+ } else {
+ return feebumper::CreateRateBumpTransaction(m_wallet.get(), txid, coin_control, errors, old_fee, new_fee, mtx) ==
+ feebumper::Result::OK;
+ }
}
bool signBumpTransaction(CMutableTransaction& mtx) override { return feebumper::SignTransaction(m_wallet.get(), mtx); }
bool commitBumpTransaction(const uint256& txid,