Skip to content

Commit a808b51

Browse files
committed
Update to rust-elements v0.19.1
The EBCompact compatibility trait is no longer necessary, the `get` prefix was removed in ElementsProject/rust-elements#128
1 parent 2924567 commit a808b51

File tree

7 files changed

+4
-38
lines changed

7 files changed

+4
-38
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bitcoin = { version = "0.28", features = [ "use-serde" ] }
2626
clap = "2.33.3"
2727
crossbeam-channel = "0.5.0"
2828
dirs = "4.0.0"
29-
elements = { version = "0.19", features = [ "serde-feature" ], optional = true }
29+
elements = { version = "0.19.1", features = [ "serde-feature" ], optional = true }
3030
error-chain = "0.12.4"
3131
glob = "0.3"
3232
hex = "0.4.2"

src/elements/mod.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -73,30 +73,4 @@ impl From<&TxIn> for IssuanceValue {
7373
},
7474
}
7575
}
76-
}
77-
78-
// Compatibility for Transaction/Block methods between rust-bitcoin and rust-elements
79-
// rust-bitcoin deprecated the 'get_' prefix in https://github.com/rust-bitcoin/rust-bitcoin/pull/861,
80-
// while rust-elements still uses it. This allows using the prefix-less methods to avoid the deprecation warnings.
81-
pub trait EBCompact {
82-
fn weight(&self) -> usize;
83-
fn size(&self) -> usize;
84-
}
85-
86-
impl EBCompact for elements::Transaction {
87-
fn weight(&self) -> usize {
88-
self.get_weight()
89-
}
90-
fn size(&self) -> usize {
91-
self.get_size()
92-
}
93-
}
94-
95-
impl EBCompact for elements::Block {
96-
fn weight(&self) -> usize {
97-
self.get_weight()
98-
}
99-
fn size(&self) -> usize {
100-
self.get_size()
101-
}
10276
}

src/new_index/fetch.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use rayon::prelude::*;
44
use bitcoin::consensus::encode::{deserialize, Decodable};
55
#[cfg(feature = "liquid")]
66
use elements::encode::{deserialize, Decodable};
7-
#[cfg(feature = "liquid")]
8-
use crate::elements::EBCompact;
97

108
use std::collections::HashMap;
119
use std::fs;

src/rest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use hyperlocal::UnixServerExt;
2323
use std::fs;
2424
#[cfg(feature = "liquid")]
2525
use {
26-
crate::elements::{peg::PegoutValue, AssetSorting, IssuanceValue, EBCompact},
26+
crate::elements::{peg::PegoutValue, AssetSorting, IssuanceValue},
2727
elements::{
2828
confidential::{Asset, Nonce, Value},
2929
encode, AssetId,

src/util/block.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ use std::slice;
99
use time::format_description::well_known::Rfc3339;
1010
use time::OffsetDateTime as DateTime;
1111

12-
#[cfg(feature = "liquid")]
13-
use crate::elements::EBCompact;
14-
1512
const MTP_SPAN: usize = 11;
1613

1714
#[derive(Debug, Serialize, Deserialize, Clone)]

src/util/fees.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
use crate::chain::{Network, Transaction, TxOut};
22
use std::collections::HashMap;
33

4-
#[cfg(feature = "liquid")]
5-
use crate::elements::EBCompact;
6-
74
const VSIZE_BIN_WIDTH: u32 = 50_000; // in vbytes
85

96
pub struct TxFeeInfo {

0 commit comments

Comments
 (0)