Skip to content

Commit

Permalink
use lifetime-less PSBT constructor API
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jan 11, 2025
1 parent 9dd1ee8 commit 801ad98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
15 changes: 5 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,10 @@ fs = ["serde"]
client-side-validation = ["bp-std/client-side-validation", "psbt/client-side-validation"]
strict-encoding = ["bp-std/strict_encoding", "psbt/strict_encoding"]
serde = ["serde_crate", "serde_yaml", "toml", "bp-std/serde", "psbt/serde", "descriptors/serde"]

[patch.crates-io]
bp-invoice = { git = "https://github.com/BP-WG/bp-std", branch = "v0.12" }
bp-derive = { git = "https://github.com/BP-WG/bp-std", branch = "v0.12" }
descriptors = { git = "https://github.com/BP-WG/bp-std", branch = "v0.12" }
psbt = { git = "https://github.com/BP-WG/bp-std", branch = "v0.12" }
bp-std = { git = "https://github.com/BP-WG/bp-std", branch = "v0.12" }
3 changes: 2 additions & 1 deletion src/cli/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ impl<O: DescriptorOpts> Exec for Args<BpCommand, O> {

// TODO: Support lock time and RBFs
let params = TxParams::with(*fee);
let (mut psbt, _) = wallet.construct_psbt(coins, beneficiaries, params)?;
let (mut psbt, _) =
wallet.construct_psbt(coins, beneficiaries.iter().copied(), params)?;

Check warning on line 527 in src/cli/command.rs

View check run for this annotation

Codecov / codecov/patch

src/cli/command.rs#L526-L527

Added lines #L526 - L527 were not covered by tests
psbt.version = if *v2 { PsbtVer::V2 } else { PsbtVer::V0 };
psbt_write_or_print(&psbt, psbt_file.as_deref())?;
}
Expand Down

0 comments on commit 801ad98

Please sign in to comment.