Skip to content

Commit 15ebc44

Browse files
committed
interfaces: Expose CreateRateBumpTransaction's orig_change_pos
1 parent 51c6981 commit 15ebc44

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/interfaces/wallet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ class Wallet
173173
std::vector<bilingual_str>& errors,
174174
CAmount& old_fee,
175175
CAmount& new_fee,
176-
CMutableTransaction& mtx) = 0;
176+
CMutableTransaction& mtx,
177+
std::optional<uint32_t> reduce_output) = 0;
177178

178179
//! Sign bump transaction.
179180
virtual bool signBumpTransaction(CMutableTransaction& mtx) = 0;

src/qt/walletmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
487487
CAmount old_fee;
488488
CAmount new_fee;
489489
CMutableTransaction mtx;
490-
if (!m_wallet->createBumpTransaction(hash, coin_control, errors, old_fee, new_fee, mtx)) {
490+
if (!m_wallet->createBumpTransaction(hash, coin_control, errors, old_fee, new_fee, mtx, /*reduce_output=*/std::nullopt)) {
491491
QMessageBox::critical(nullptr, tr("Fee bump error"), tr("Increasing transaction fee failed") + "<br />(" +
492492
(errors.size() ? QString::fromStdString(errors[0].translated) : "") +")");
493493
return false;

src/wallet/interfaces.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,11 @@ class WalletImpl : public Wallet
314314
std::vector<bilingual_str>& errors,
315315
CAmount& old_fee,
316316
CAmount& new_fee,
317-
CMutableTransaction& mtx) override
317+
CMutableTransaction& mtx,
318+
std::optional<uint32_t> reduce_output) override
318319
{
319320
std::vector<CTxOut> outputs; // just an empty list of new recipients for now
320-
return feebumper::CreateRateBumpTransaction(*m_wallet.get(), txid, coin_control, errors, old_fee, new_fee, mtx, /* require_mine= */ true, outputs) == feebumper::Result::OK;
321+
return feebumper::CreateRateBumpTransaction(*m_wallet.get(), txid, coin_control, errors, old_fee, new_fee, mtx, /* require_mine= */ true, outputs, reduce_output) == feebumper::Result::OK;
321322
}
322323
bool signBumpTransaction(CMutableTransaction& mtx) override { return feebumper::SignTransaction(*m_wallet.get(), mtx); }
323324
bool commitBumpTransaction(const uint256& txid,

0 commit comments

Comments
 (0)