Skip to content

Commit

Permalink
Update rust-bitcoin to v0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
shesek committed Jun 22, 2022
1 parent 3483d23 commit 93fff34
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 14 deletions.
45 changes: 38 additions & 7 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arraydeque = "0.4"
arrayref = "0.3.6"
base64 = "0.13.0"
bincode = "1.3.1"
bitcoin = { version = "0.27", features = [ "use-serde" ] }
bitcoin = { version = "0.28", features = [ "use-serde" ] }
clap = "2.33.3"
crossbeam-channel = "0.5.0"
dirs = "4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/new_index/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn bitcoind_fetcher(
.zip(entries)
.map(|(block, entry)| BlockEntry {
entry: entry.clone(), // TODO: remove this clone()
size: block.get_size() as u32,
size: block.size() as u32,
block,
})
.collect();
Expand Down
4 changes: 2 additions & 2 deletions src/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ impl TransactionValue {
locktime: tx.lock_time,
vin: vins,
vout: vouts,
size: tx.get_size() as u32,
weight: tx.get_weight() as u32,
size: tx.size() as u32,
weight: tx.weight() as u32,
fee,
status: Some(TransactionStatus::from(blockid)),
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl From<&BlockEntry> for BlockMeta {
fn from(b: &BlockEntry) -> BlockMeta {
BlockMeta {
tx_count: b.block.txdata.len() as u32,
weight: b.block.get_weight() as u32,
weight: b.block.weight() as u32,
size: b.size,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct TxFeeInfo {
impl TxFeeInfo {
pub fn new(tx: &Transaction, prevouts: &HashMap<u32, &TxOut>, network: Network) -> Self {
let fee = get_tx_fee(tx, prevouts, network);
let vsize = tx.get_weight() / 4;
let vsize = tx.weight() / 4;

TxFeeInfo {
fee,
Expand Down
2 changes: 1 addition & 1 deletion src/util/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn get_innerscripts(txin: &TxIn, prevout: &TxOut) -> InnerScripts {
let witness = &txin.witness;
#[cfg(feature = "liquid")]
let witness = &witness.script_witness;
witness.iter().last().cloned().map(Script::from)
witness.iter().last().map(Vec::from).map(Script::from)
} else {
None
};
Expand Down

0 comments on commit 93fff34

Please sign in to comment.