Skip to content

Commit

Permalink
explorer: fix witness size computation
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Apr 16, 2023
1 parent c6e6951 commit fd18e5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "descriptor-wallet"
version = "0.9.1"
version = "0.9.2"
license = "Apache-2.0"
authors = ["Dr. Maxim Orlovsky <[email protected]>"]
description = "Libraries and command line tool for building descriptor-based bitcoin wallets"
Expand Down Expand Up @@ -31,7 +31,7 @@ name = "btc-expl"
required-features = ["cli", "compiler"]

[dependencies]
amplify = "3.13.0"
amplify = "3.14.2"
strict_encoding_crate = { package = "strict_encoding", version = "0.9.0", features = ["bitcoin", "derive"], optional = true }
bitcoin = "0.29.2"
bitcoin_scripts = "0.9.1"
Expand Down
3 changes: 2 additions & 1 deletion src/bin/btc-expl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ impl Args {

println!();
for (vin, (prev_tx, txin)) in prev_txs.into_iter().zip(tx.input).enumerate() {
witness_size += txin.witness.iter().map(<[u8]>::len).sum::<usize>();

let prevout = &prev_tx.output[txin.previous_output.vout as usize];
println!(
"{} {} <- {}",
Expand Down Expand Up @@ -316,7 +318,6 @@ impl Args {
_ => {
println!(" witness stack:");
for el in txin.witness.iter() {
witness_size += el.len();
println!(" - {}", el.to_hex());
}
}
Expand Down

0 comments on commit fd18e5c

Please sign in to comment.