Skip to content

Commit

Permalink
Merge #1172: [backport] gui: fix displayed feerate estimate
Browse files Browse the repository at this point in the history
55325c9 gui: fix displayed feerate estimate (jp1ac4)

Pull request description:

  backport of #1171 to 6.x

ACKs for top commit:
  jp1ac4:
    ACK 55325c9.

Tree-SHA512: 122d4231aded98f00504d0a2c25ab58fd32619bc7d7c76d3c1702aeb4a1b4f6b17dd293403ed69c541e60475183cf028859ea0a91ad29ec11c825849e50f4bb7
  • Loading branch information
edouardparis committed Jul 4, 2024
2 parents c06d5b1 + 55325c9 commit 0aad8a5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gui/src/daemon/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ impl SpendTx {
secp: &secp256k1::Secp256k1<impl secp256k1::Verification>,
network: Network,
) -> Self {
let max_vbytes = desc.unsigned_tx_max_vbytes(&psbt.unsigned_tx, false);
// Use primary path if no inputs are using a relative locktime.
let use_primary_path = !psbt
.unsigned_tx
.input
.iter()
.map(|txin| txin.sequence)
.any(|seq| seq.is_relative_lock_time());
let max_vbytes = desc.unsigned_tx_max_vbytes(&psbt.unsigned_tx, use_primary_path);
let change_indexes: Vec<usize> = desc
.change_indexes(&psbt, secp)
.into_iter()
Expand Down

0 comments on commit 0aad8a5

Please sign in to comment.