diff --git a/Cargo.toml b/Cargo.toml index d77083a..41fde09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ path = "src/lib.rs" [dependencies] serde = { version = "1.0", features = ["derive"] } -bitcoin = { version = "0.28.1", features = ["use-serde"] } +bitcoin = { version = "0.29.1", features = ["serde"] } log = "^0.4" ureq = { version = "~2.2.0", features = ["json"], optional = true } reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] } @@ -25,8 +25,8 @@ reqwest = { version = "0.11", optional = true, default-features = false, feature [dev-dependencies] serde_json = "1.0" tokio = { version = "1.20.1", features = ["full"] } -electrsd = { version = "0.19.1", features = ["legacy", "esplora_a33e97e1", "bitcoind_22_0"] } -electrum-client = "0.10" +electrsd = { version = "0.21.1", features = ["legacy", "esplora_a33e97e1", "bitcoind_22_0"] } +electrum-client = "0.12.0" lazy_static = "1.4.0" [features] diff --git a/src/api.rs b/src/api.rs index 7b86c9f..3c22971 100644 --- a/src/api.rs +++ b/src/api.rs @@ -83,7 +83,7 @@ impl Tx { pub fn to_tx(&self) -> Transaction { Transaction { version: self.version, - lock_time: self.locktime, + lock_time: bitcoin::PackedLockTime(self.locktime), input: self .vin .iter() @@ -94,7 +94,7 @@ impl Tx { vout: vin.vout, }, script_sig: vin.scriptsig, - sequence: vin.sequence, + sequence: bitcoin::Sequence(vin.sequence), witness: Witness::from_vec(vin.witness), }) .collect(), diff --git a/src/lib.rs b/src/lib.rs index ba7e388..9a6c1c2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -204,6 +204,7 @@ mod test { use tokio::sync::Mutex; #[cfg(all(feature = "blocking", any(feature = "async", feature = "async-https")))] use { + bitcoin::hashes::Hash, bitcoin::Amount, electrsd::{ bitcoind::bitcoincore_rpc::bitcoincore_rpc_json::AddressType, @@ -491,7 +492,7 @@ mod test { let (blocking_client, async_client) = setup_clients().await; - let block_hash = BlockHash::default(); + let block_hash = BlockHash::all_zeros(); let expected = BlockStatus { in_best_chain: false,