Skip to content

Commit

Permalink
gui: fix displayed feerate estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
jp1ac4 authored and edouardparis committed Jul 4, 2024
1 parent c06d5b1 commit 55325c9
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 55325c9

Please sign in to comment.