gui: fix displayed feerate estimate
This commit is contained in:
parent
51d28129bc
commit
6c5f83ce15
@ -64,7 +64,14 @@ impl SpendTx {
|
|||||||
secp: &secp256k1::Secp256k1<impl secp256k1::Verification>,
|
secp: &secp256k1::Secp256k1<impl secp256k1::Verification>,
|
||||||
network: Network,
|
network: Network,
|
||||||
) -> Self {
|
) -> 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
|
let change_indexes: Vec<usize> = desc
|
||||||
.change_indexes(&psbt, secp)
|
.change_indexes(&psbt, secp)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user