Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
640 changes: 299 additions & 341 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ 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 = "3.0.1"
elements = { version = "0.18", features = [ "serde-feature" ], optional = true }
dirs = "4.0.0"
elements = { version = "0.19.1", features = [ "serde-feature" ], optional = true }
error-chain = "0.12.4"
glob = "0.3"
hex = "0.4.2"
Expand All @@ -37,7 +37,7 @@ log = "0.4.11"
socket2 = { version = "0.4", features = ["all"] }
num_cpus = "1.12.0"
page_size = "0.4.2"
prometheus = "0.12"
prometheus = "0.13"
rayon = "1.5.0"
rocksdb = { version = "0.17.0", optional = true }
rocksdb-oldcpu = { version = "0.12.4", optional = true, package = "rocksdb" }
Expand All @@ -49,7 +49,7 @@ signal-hook = "0.3"
stderrlog = "0.5.0"
sysconf = ">=0.3.4"
time = { version = "0.3", features = ["formatting"] }
tiny_http = "0.8"
tiny_http = "0.11"
url = "2.2.0"
hyper = "0.14"
hyperlocal = "0.8"
Expand All @@ -71,8 +71,3 @@ codegen-units = 1
[patch.crates-io.electrum-client]
git = "https://github.com/Blockstream/rust-electrum-client"
rev = "d3792352992a539afffbe11501d1aff9fd5b919d" # add-peer branch

# needed for https://github.com/ElementsProject/rust-elements/pull/98 until a new release is made
[patch.crates-io.elements]
git = "https://github.com/ElementsProject/rust-elements"
rev = "d988bd7ed9cf539b8fea0da042efa5a4e1eef86f"
2 changes: 1 addition & 1 deletion src/elements/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ impl From<&TxIn> for IssuanceValue {
},
}
}
}
}
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
8 changes: 4 additions & 4 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 Expand Up @@ -438,9 +438,9 @@ impl From<Utxo> for UtxoValue {
surjection_proof: utxo
.witness
.surjection_proof
.map_or(vec![], |p| p.serialize()),
.map_or(vec![], |p| (*p).serialize()),
#[cfg(feature = "liquid")]
range_proof: utxo.witness.rangeproof.map_or(vec![], |p| p.serialize()),
range_proof: utxo.witness.rangeproof.map_or(vec![], |p| (*p).serialize()),
}
}
}
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
9 changes: 8 additions & 1 deletion src/util/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ 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)

// rust-bitcoin returns witness items as a [u8] slice, while rust-elements returns a Vec<u8>
#[cfg(not(feature = "liquid"))]
let wit_to_vec = Vec::from;
#[cfg(feature = "liquid")]
let wit_to_vec = Clone::clone;

witness.iter().last().map(wit_to_vec).map(Script::from)
} else {
None
};
Expand Down