Merge #1171: gui: fix displayed feerate estimate
6c5f83ce15805997632cc6f698d40b4c2eb4017e gui: fix displayed feerate estimate (jp1ac4) Pull request description: This is to fix #1168. When estimating transaction size, check if any inputs are using a relative locktime. I think this logic could later be moved to the `unsigned_tx_max_vbytes` method itself. ACKs for top commit: edouardparis: ACK 6c5f83ce15805997632cc6f698d40b4c2eb4017e Tree-SHA512: b95853b0b59729d4f8356e6e556c209025eec25e235cacf2385920f90e19f2e4a057d0d59aa28015fdfcc72f7133f122bfa3f3a9e3ced77e2f189ba43570413c
This commit is contained in:
commit
ccc88421b3
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user