diff --git a/Cargo.lock b/Cargo.lock index 7c0891061..6a905bb36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -304,22 +304,9 @@ dependencies = [ [[package]] name = "bitcoind" -version = "0.34.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50548a349632abb9a2007d431a302bf0401a786c91f809ff31765fba87e2397" -dependencies = [ - "anyhow", - "bitcoincore-rpc", - "log", - "tempfile", - "which", -] - -[[package]] -name = "bitcoind" -version = "0.35.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09db6b30b527263d2e3a8768a2c9299763858cb84d01a9d63d174b9f515e1a32" +checksum = "2542fac51d8cd8fce6109f4a3ffd1acfdaa3394c36d4a8207af15b8b0540e2fc" dependencies = [ "anyhow", "bitcoin_hashes 0.13.0", @@ -642,7 +629,7 @@ dependencies = [ "base64 0.22.0", "bincode", "bitcoin 0.31.2", - "bitcoind 0.35.1", + "bitcoind", "clap", "crossbeam-channel", "dirs", @@ -723,12 +710,12 @@ dependencies = [ [[package]] name = "elementsd" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17022ca1a790518f66c46c40ab729cc275f8a009babad583972a946a851cadf" +checksum = "19b08013ae0b60e4a3ac9d126e230338dec55575ddf7811aeaebb096f7c3abbf" dependencies = [ "bitcoin_hashes 0.12.0", - "bitcoind 0.34.1", + "bitcoind", "flate2", "minreq", "tar", diff --git a/Cargo.toml b/Cargo.toml index ca9e98c38..5bdcec6ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,9 +58,9 @@ electrum-client = { version = "0.8", optional = true } [dev-dependencies] -bitcoind = { version = "0.35", features = ["25_0"] } -elementsd = { version = "0.9", features = ["22_1_1"] } -electrumd = { version = "0.1.0", features = ["4_1_5"] } +bitcoind = { version = "0.34.3", features = ["25_0"] } +elementsd = { version = "0.9.2", features = ["22_1_1"] } +electrumd = { version = "0.1.0", features = ["4_5_4"] } ureq = { version = "2.9", default-features = false, features = ["json"] } tempfile = "3.10" diff --git a/flake.nix b/flake.nix index a543e64ef..ece2db67d 100644 --- a/flake.nix +++ b/flake.nix @@ -36,16 +36,22 @@ nativeBuildInputs = with pkgs; [ rustToolchain clang ]; # required only at build time buildInputs = with pkgs; [ ]; # also required at runtime - envVars = { - LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; - ELEMENTSD_SKIP_DOWNLOAD = true; - BITCOIND_SKIP_DOWNLOAD = true; - ELECTRUMD_SKIP_DOWNLOAD = true; + envVars = + { + LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; + ELEMENTSD_SKIP_DOWNLOAD = true; + BITCOIND_SKIP_DOWNLOAD = true; + ELECTRUMD_SKIP_DOWNLOAD = true; - # link rocksdb dynamically - ROCKSDB_INCLUDE_DIR = "${pkgs.rocksdb}/include"; - ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib"; - }; + # link rocksdb dynamically + ROCKSDB_INCLUDE_DIR = "${pkgs.rocksdb}/include"; + ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib"; + + # for integration testing + BITCOIND_EXE = "${pkgs.bitcoind}/bin/bitcoind"; + ELEMENTSD_EXE = "${pkgs.elementsd}/bin/elementsd"; + ELECTRUMD_EXE = "${pkgs.electrum}/bin/electrum"; + }; commonArgs = { inherit src buildInputs nativeBuildInputs; @@ -54,16 +60,10 @@ cargoArtifacts = craneLib.buildDepsOnly commonArgs; bin = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; - - # TODO: do testing by providing executables via *_EXE env var for {bitcoin,elements,electrum}d - doCheck = false; }); binLiquid = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; cargoExtraArgs = "--features liquid"; - - # TODO: do testing by providing executables via *_EXE env var for {bitcoin,elements,electrum}d - doCheck = false; }); in diff --git a/tests/electrum.rs b/tests/electrum.rs index 504d16ca8..bb3115029 100644 --- a/tests/electrum.rs +++ b/tests/electrum.rs @@ -125,7 +125,7 @@ fn test_electrum() -> Result<()> { )?]), )?; notify_wallet(); - assert_balance(0.3, -0.161); + assert_balance(0.139, 0.0); tester.mine()?; notify_wallet();