mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-02 20:05:45 +02:00
wallet, refactor: Convert uint256 to Txid in wallet interfaces
In most cases throughout the wallet, the implicit conversion from `Txid` to `const uint256&` works. However, `commitBumpTransaction` requires a `uint256&` out parameter, so `bumped_txid` in `feebumper::CommitTransaction` is also updated here to use `Txid`.
This commit is contained in:
@@ -561,15 +561,11 @@ bool WalletModel::bumpFee(Txid hash, Txid& new_hash)
|
||||
return false;
|
||||
}
|
||||
// commit the bumped transaction
|
||||
// Temporary uint256 variable needed for commitBumpTransaction out parameter.
|
||||
uint256 bumped_txid_result;
|
||||
if(!m_wallet->commitBumpTransaction(hash, std::move(mtx), errors, bumped_txid_result)) {
|
||||
if(!m_wallet->commitBumpTransaction(hash, std::move(mtx), errors, new_hash)) {
|
||||
QMessageBox::critical(nullptr, tr("Fee bump error"), tr("Could not commit transaction") + "<br />(" +
|
||||
QString::fromStdString(errors[0].translated)+")");
|
||||
return false;
|
||||
}
|
||||
// Assign the received txid back to the new_hash.
|
||||
new_hash = Txid::FromUint256(bumped_txid_result);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user