From 69ee9818258bc0c04197000b1bdbe9e28be7f81c Mon Sep 17 00:00:00 2001 From: rustaceanrob Date: Tue, 29 Jul 2025 10:56:00 +0100 Subject: [PATCH] Add `bitcoin` as a workspace dependency --- Cargo.toml | 5 ++++- accumulator/Cargo.toml | 3 +-- flake.nix | 2 +- p2p/Cargo.toml | 2 +- p2p/src/tokio_ext.rs | 2 +- peers/Cargo.toml | 2 +- utxo_verifier/Cargo.toml | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef52f50..e83c6df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,7 @@ [workspace] members = ["accumulator", "p2p", "peers", "utxo_verifier"] -default-members = ["accumulator"] +default-members = ["accumulator", "p2p", "peers", "utxo_verifier"] resolver = "3" + +[workspace.dependencies] +bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin", default-features = false, rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" } diff --git a/accumulator/Cargo.toml b/accumulator/Cargo.toml index c31d64c..75991ba 100644 --- a/accumulator/Cargo.toml +++ b/accumulator/Cargo.toml @@ -4,8 +4,7 @@ version = "0.1.0" edition = "2024" [dependencies] -bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin", default-features = false, rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" } +bitcoin = { workspace = true } [dev-dependencies] -bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin", default-features = true, rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" } rusqlite = { version = "0.36.0", features = ["bundled"] } diff --git a/flake.nix b/flake.nix index 86d3d8b..46a30ee 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,7 @@ devShells.default = with pkgs; mkShell { buildInputs = [ pkg-config - rust-bin.beta.latest.default + rust-bin.nightly.latest.default ]; }; } diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index 61c33e0..f978c4a 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -9,7 +9,7 @@ categories = ["cryptography::cryptocurrencies"] rust-version = "1.75.0" [dependencies] -bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin", default-features = true, rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" } +bitcoin = { workspace = true, features = ["rand-std"] } p2p = { package = "bitcoin-p2p-messages", git = "https://github.com/rust-bitcoin/rust-bitcoin", rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" } tokio = { version = "1", default-features = false, optional = true, features = [ "sync", diff --git a/p2p/src/tokio_ext.rs b/p2p/src/tokio_ext.rs index 9883c80..e4e38fb 100644 --- a/p2p/src/tokio_ext.rs +++ b/p2p/src/tokio_ext.rs @@ -38,7 +38,7 @@ pub trait TokioConnectionExt { tcp_stream: TcpStream, ) -> Result<(TcpStream, ConnectionContext), Self::Error>; - /// + /// Open a feeler to test a node's liveliness #[allow(async_fn_in_trait)] async fn open_feeler(self, to: impl Into) -> Result; } diff --git a/peers/Cargo.toml b/peers/Cargo.toml index 51c92d4..bf791a0 100644 --- a/peers/Cargo.toml +++ b/peers/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2024" [dependencies] -bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin", default-features = true, rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" } +bitcoin = { workspace = true, features = ["rand-std"] } tokio = { version = "1", default-features = false, optional = true, features = [ "io-util", "net", diff --git a/utxo_verifier/Cargo.toml b/utxo_verifier/Cargo.toml index 881de8c..421d2f5 100644 --- a/utxo_verifier/Cargo.toml +++ b/utxo_verifier/Cargo.toml @@ -5,7 +5,7 @@ edition = "2024" [dependencies] accumulator = { path = "../accumulator/" } -bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin", default-features = true, rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" } +bitcoin = { workspace = true, features = ["rand-std"] } peers = { path = "../peers/", default-features = false } p2p = { path = "../p2p/", package = "swiftsync-p2p", default-features = false } p2p-messages = { package = "bitcoin-p2p-messages", git = "https://github.com/rust-bitcoin/rust-bitcoin", rev = "2bb9bb6bc99ba07ed3d543a512ec3d2a9462770d" }