diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8204ff087..ecc591f7c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,7 +55,7 @@ jobs: uses: actions/checkout@v3 - name: Symlink lightwalletd and zcash binaries - run: ln -s /usr/bin/lightwalletd /usr/bin/zcashd /usr/bin/zcash-cli ./regtest/bin/ + run: ln -s /usr/bin/lightwalletd /usr/bin/zcashd /usr/bin/zcash-cli ./zingocli/regtest/bin/ - name: Symlink zcash parameters run: ln -s /root/.zcash-params /github/home diff --git a/.gitignore b/.gitignore index d0cf94dd7..83fb400c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ -regtest/data/zcashd/regtest/ -regtest/data/lightwalletd/ -regtest/data/zingo/ +zingocli/regtest/data/zcashd/regtest/ +zingocli/regtest/data/lightwalletd/ +zingocli/regtest/data/zingo/ +zingocli/regtest/zingo-wallet.dat +zingocli/regtest/bin target zingolib/target zingocli/target diff --git a/regtest/README.md b/zingo-testutils/regtest/README.md similarity index 92% rename from regtest/README.md rename to zingo-testutils/regtest/README.md index 6514419bf..15f26e44a 100644 --- a/regtest/README.md +++ b/zingo-testutils/regtest/README.md @@ -5,20 +5,20 @@ WARNING Experimental! The CLI can work in regtest mode, by locally running a `zcashd` and `lightwalletd`. This is now working with a simple `zingo-cli` invocation flag, with a little user setup. -There are pre-made directories in this repo to support ready use of regtest mode. These are found in the `$G/regtest/` subdirectory. +There are pre-made directories in this repo to support ready use of regtest mode. These are found in the `$G/zingocli/regtest/` subdirectory. -There are default config files for these binaries already in place in `$G/regtest/conf/` which can also be edited. +There are default config files for these binaries already in place in `$G/zingocli/regtest/conf/` which can also be edited. Because regtest mode has no ability to cope with an initial `zcashd` state without any blocks, we have included files to produce an initial block height of one, with no variation between runs. -These files are copied from a 'passive' directory (`$G/regtest/data/regtestvectors/`) +These files are copied from a 'passive' directory (`$G/zingocli/regtest/data/regtestvectors/`) into a newly cleared 'active' data directory at the beginning of each time regtest mode is run. This means, by default, any blocks added while zcashd is running are not retained for subsequent runs. The default config includes all network upgrades set to block height 1, therefore all network upgrades are active by default in regtest mode. # Usage example: -You must copy your compiled `zcashd`, `zcash-cli` and `lightwalletd` binaries to `$G/regtest/bin/` or set up symlinks, etc. `zcash-cli` is also needed if you wish +You must copy your compiled `zcashd`, `zcash-cli` and `lightwalletd` binaries to `$G/zingocli/regtest/bin/` or set up symlinks, etc. `zcash-cli` is also needed if you wish to interact with your `zcashd` instance while it is running. From your `$G/` directory, you can run: @@ -48,7 +48,7 @@ at which point the interactive cli application should work with your regtest net Once regtest mode is running, you can manipulate the simulated chain with `zcash-cli`. -For example, in still another terminal instance in the `$G/regtest/bin/` directory, you can run +For example, in still another terminal instance in the `$G/zingocli/regtest/bin/` directory, you can run `./zcash-cli -regtest -rpcuser=xxxxxx -rpcpassword=xxxxxx generate 11` to generate 11 blocks. Please note that by adding more than 100 blocks it is difficult or impossible to rewind the chain. The config means that after the first block all network upgrades should be in place. Other `zcash-cli` commands should work similarly. @@ -59,7 +59,7 @@ Invocation currently only works when being launched within a `zingolib` repo's w Have fun! # Tree Diagrams -In `$G/`, running `tree ./regtest` +In `$G/zingocli`, running `tree ./regtest` after moving binaries and running: ./regtest/ ├── bin @@ -150,4 +150,4 @@ after moving binaries and running: └── README.md # Working Commits -Tested with `zcash` commit `d6d209`, `lightwalletd` commit `f53511c`, and `zingolib` commit `c414fc` or better. +Tested with `zcash` commit `d6d209`, `lightwalletd` commit `f53511c`, and `zingolib` commit `89fbe118f8305051d5f1d1d95903ba3ccaec586b` or better. diff --git a/regtest/bin/.gitignore b/zingo-testutils/regtest/bin/.gitignore similarity index 100% rename from regtest/bin/.gitignore rename to zingo-testutils/regtest/bin/.gitignore diff --git a/regtest/bin/.gitkeep b/zingo-testutils/regtest/bin/.gitkeep similarity index 100% rename from regtest/bin/.gitkeep rename to zingo-testutils/regtest/bin/.gitkeep diff --git a/regtest/conf/lightwalletd.yml b/zingo-testutils/regtest/conf/lightwalletd.yml similarity index 100% rename from regtest/conf/lightwalletd.yml rename to zingo-testutils/regtest/conf/lightwalletd.yml diff --git a/regtest/conf/zcash.conf b/zingo-testutils/regtest/conf/zcash.conf similarity index 100% rename from regtest/conf/zcash.conf rename to zingo-testutils/regtest/conf/zcash.conf diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/.lock b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/.lock similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/.lock rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/.lock diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/banlist.dat b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/banlist.dat similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/banlist.dat rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/banlist.dat diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/blk00000.dat b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/blk00000.dat similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/blk00000.dat rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/blk00000.dat diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000005.ldb b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000005.ldb similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000005.ldb rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000005.ldb diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000006.log b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000006.log similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000006.log rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/000006.log diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/CURRENT b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/CURRENT similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/CURRENT rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/CURRENT diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/LOCK b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/LOCK similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/LOCK rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/LOCK diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/MANIFEST-000004 b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/MANIFEST-000004 similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/MANIFEST-000004 rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/index/MANIFEST-000004 diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/rev00000.dat b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/rev00000.dat similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/rev00000.dat rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/blocks/rev00000.dat diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000005.ldb b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000005.ldb similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000005.ldb rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000005.ldb diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000006.log b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000006.log similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000006.log rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/000006.log diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/CURRENT b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/CURRENT similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/CURRENT rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/CURRENT diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/LOCK b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/LOCK similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/LOCK rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/LOCK diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/MANIFEST-000004 b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/MANIFEST-000004 similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/MANIFEST-000004 rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/chainstate/MANIFEST-000004 diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/db.log b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/db.log similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/db.log rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/db.log diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/fee_estimates.dat b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/fee_estimates.dat similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/fee_estimates.dat rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/fee_estimates.dat diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/peers.dat b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/peers.dat similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/peers.dat rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/peers.dat diff --git a/regtest/data/chain_cache/blocks_1153/zcashd/regtest/wallet.dat b/zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/wallet.dat similarity index 100% rename from regtest/data/chain_cache/blocks_1153/zcashd/regtest/wallet.dat rename to zingo-testutils/regtest/data/chain_cache/blocks_1153/zcashd/regtest/wallet.dat diff --git a/regtest/data/lightwalletd/.gitkeep b/zingo-testutils/regtest/data/lightwalletd/.gitkeep similarity index 100% rename from regtest/data/lightwalletd/.gitkeep rename to zingo-testutils/regtest/data/lightwalletd/.gitkeep diff --git a/regtest/data/regtestvectors/regtest/.lock b/zingo-testutils/regtest/data/regtestvectors/regtest/.lock similarity index 100% rename from regtest/data/regtestvectors/regtest/.lock rename to zingo-testutils/regtest/data/regtestvectors/regtest/.lock diff --git a/regtest/data/regtestvectors/regtest/banlist.dat b/zingo-testutils/regtest/data/regtestvectors/regtest/banlist.dat similarity index 100% rename from regtest/data/regtestvectors/regtest/banlist.dat rename to zingo-testutils/regtest/data/regtestvectors/regtest/banlist.dat diff --git a/regtest/data/regtestvectors/regtest/blocks/blk00000.dat b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/blk00000.dat similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/blk00000.dat rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/blk00000.dat diff --git a/regtest/data/regtestvectors/regtest/blocks/index/000005.ldb b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/000005.ldb similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/000005.ldb rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/000005.ldb diff --git a/regtest/data/regtestvectors/regtest/blocks/index/000008.ldb b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/000008.ldb similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/000008.ldb rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/000008.ldb diff --git a/regtest/data/regtestvectors/regtest/blocks/index/000009.log b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/000009.log similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/000009.log rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/000009.log diff --git a/regtest/data/regtestvectors/regtest/blocks/index/CURRENT b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/CURRENT similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/CURRENT rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/CURRENT diff --git a/regtest/data/regtestvectors/regtest/blocks/index/LOCK b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/LOCK similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/LOCK rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/LOCK diff --git a/regtest/data/regtestvectors/regtest/blocks/index/LOG b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/LOG similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/LOG rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/LOG diff --git a/regtest/data/regtestvectors/regtest/blocks/index/LOG.old b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/LOG.old similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/LOG.old rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/LOG.old diff --git a/regtest/data/regtestvectors/regtest/blocks/index/MANIFEST-000007 b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/MANIFEST-000007 similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/index/MANIFEST-000007 rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/index/MANIFEST-000007 diff --git a/regtest/data/regtestvectors/regtest/blocks/rev00000.dat b/zingo-testutils/regtest/data/regtestvectors/regtest/blocks/rev00000.dat similarity index 100% rename from regtest/data/regtestvectors/regtest/blocks/rev00000.dat rename to zingo-testutils/regtest/data/regtestvectors/regtest/blocks/rev00000.dat diff --git a/regtest/data/regtestvectors/regtest/chainstate/000005.ldb b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/000005.ldb similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/000005.ldb rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/000005.ldb diff --git a/regtest/data/regtestvectors/regtest/chainstate/000008.ldb b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/000008.ldb similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/000008.ldb rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/000008.ldb diff --git a/regtest/data/regtestvectors/regtest/chainstate/000009.log b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/000009.log similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/000009.log rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/000009.log diff --git a/regtest/data/regtestvectors/regtest/chainstate/CURRENT b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/CURRENT similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/CURRENT rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/CURRENT diff --git a/regtest/data/regtestvectors/regtest/chainstate/LOCK b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/LOCK similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/LOCK rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/LOCK diff --git a/regtest/data/regtestvectors/regtest/chainstate/LOG b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/LOG similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/LOG rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/LOG diff --git a/regtest/data/regtestvectors/regtest/chainstate/LOG.old b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/LOG.old similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/LOG.old rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/LOG.old diff --git a/regtest/data/regtestvectors/regtest/chainstate/MANIFEST-000007 b/zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/MANIFEST-000007 similarity index 100% rename from regtest/data/regtestvectors/regtest/chainstate/MANIFEST-000007 rename to zingo-testutils/regtest/data/regtestvectors/regtest/chainstate/MANIFEST-000007 diff --git a/regtest/data/regtestvectors/regtest/database/log.0000000001 b/zingo-testutils/regtest/data/regtestvectors/regtest/database/log.0000000001 similarity index 100% rename from regtest/data/regtestvectors/regtest/database/log.0000000001 rename to zingo-testutils/regtest/data/regtestvectors/regtest/database/log.0000000001 diff --git a/regtest/data/regtestvectors/regtest/db.log b/zingo-testutils/regtest/data/regtestvectors/regtest/db.log similarity index 100% rename from regtest/data/regtestvectors/regtest/db.log rename to zingo-testutils/regtest/data/regtestvectors/regtest/db.log diff --git a/regtest/data/regtestvectors/regtest/fee_estimates.dat b/zingo-testutils/regtest/data/regtestvectors/regtest/fee_estimates.dat similarity index 100% rename from regtest/data/regtestvectors/regtest/fee_estimates.dat rename to zingo-testutils/regtest/data/regtestvectors/regtest/fee_estimates.dat diff --git a/regtest/data/regtestvectors/regtest/peers.dat b/zingo-testutils/regtest/data/regtestvectors/regtest/peers.dat similarity index 100% rename from regtest/data/regtestvectors/regtest/peers.dat rename to zingo-testutils/regtest/data/regtestvectors/regtest/peers.dat diff --git a/regtest/data/regtestvectors/regtest/wallet.dat b/zingo-testutils/regtest/data/regtestvectors/regtest/wallet.dat similarity index 100% rename from regtest/data/regtestvectors/regtest/wallet.dat rename to zingo-testutils/regtest/data/regtestvectors/regtest/wallet.dat diff --git a/regtest/data/zcashd/.gitkeep b/zingo-testutils/regtest/data/zcashd/.gitkeep similarity index 100% rename from regtest/data/zcashd/.gitkeep rename to zingo-testutils/regtest/data/zcashd/.gitkeep diff --git a/regtest/logs/.gitignore b/zingo-testutils/regtest/logs/.gitignore similarity index 100% rename from regtest/logs/.gitignore rename to zingo-testutils/regtest/logs/.gitignore diff --git a/regtest/logs/.gitkeep b/zingo-testutils/regtest/logs/.gitkeep similarity index 100% rename from regtest/logs/.gitkeep rename to zingo-testutils/regtest/logs/.gitkeep diff --git a/regtest/logs/lightwalletd/.gitkeep b/zingo-testutils/regtest/logs/lightwalletd/.gitkeep similarity index 100% rename from regtest/logs/lightwalletd/.gitkeep rename to zingo-testutils/regtest/logs/lightwalletd/.gitkeep diff --git a/regtest/logs/zcashd/.gitkeep b/zingo-testutils/regtest/logs/zcashd/.gitkeep similarity index 100% rename from regtest/logs/zcashd/.gitkeep rename to zingo-testutils/regtest/logs/zcashd/.gitkeep diff --git a/zingo-testutils/src/lib.rs b/zingo-testutils/src/lib.rs index 120b0e664..379409549 100644 --- a/zingo-testutils/src/lib.rs +++ b/zingo-testutils/src/lib.rs @@ -247,8 +247,8 @@ pub fn get_wallet_nym(nym: &str) -> Result<(String, PathBuf, PathBuf), String> { match nym { "sap_only" | "orch_only" | "orch_and_sapl" | "tadd_only" => { let one_sapling_wallet = format!( - "{}/zingocli/tests/data/wallets/v26/202302_release/regtest/{nym}/zingo-wallet.dat", - regtest::get_cargo_manifest_dir_parent().to_string_lossy() + "{}/tests/data/wallets/v26/202302_release/regtest/{nym}/zingo-wallet.dat", + regtest::get_cargo_manifest_dir().to_string_lossy() ); let wallet_path = Path::new(&one_sapling_wallet); let wallet_dir = wallet_path.parent().unwrap(); @@ -388,6 +388,9 @@ pub mod scenarios { pub fn new_load_1153_saplingcb_regtest_chain() -> Self { let mut sb = ScenarioBuilder::build_scenario(None, None); let source = get_regtest_dir().join("data/chain_cache/blocks_1153/zcashd/regtest"); + if !source.exists() { + panic!("Data cache is missing!"); + } let destination = &sb.regtest_manager.zcashd_data_dir; std::process::Command::new("cp") diff --git a/zingo-testutils/src/regtest.rs b/zingo-testutils/src/regtest.rs index 65816bc4f..944feb2fc 100644 --- a/zingo-testutils/src/regtest.rs +++ b/zingo-testutils/src/regtest.rs @@ -4,15 +4,12 @@ use std::io::Read; /// Simple helper to succinctly reference the project root dir. use std::path::PathBuf; use std::process::Child; -pub fn get_cargo_manifest_dir_parent() -> PathBuf { +pub fn get_cargo_manifest_dir() -> PathBuf { PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").expect("To be inside a manifested space.")) - .parent() - .unwrap() - .to_path_buf() } pub fn get_regtest_dir() -> PathBuf { - get_cargo_manifest_dir_parent().join("regtest") + get_cargo_manifest_dir().join("regtest") } /// To manage the state associated a "regtest" run this type: diff --git a/zingocli/regtest/bin/.gitinclude b/zingocli/regtest/bin/.gitinclude new file mode 100644 index 000000000..e69de29bb diff --git a/zingocli/tests/integration_tests.rs b/zingocli/tests/integration_tests.rs index aca6e0255..6e0291512 100644 --- a/zingocli/tests/integration_tests.rs +++ b/zingocli/tests/integration_tests.rs @@ -16,7 +16,7 @@ use zcash_primitives::{ merkle_tree::write_incremental_witness, transaction::{fees::zip317::MINIMUM_FEE, TxId}, }; -use zingo_testutils::regtest::get_cargo_manifest_dir_parent; +use zingo_testutils::regtest::get_cargo_manifest_dir; use zingoconfig::{ChainType, ZingoConfig}; use zingolib::{ check_client_balances, get_base_address, @@ -33,8 +33,7 @@ use zingolib::{ #[tokio::test] async fn dont_write_unconfirmed() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; faucet .do_send(vec![( &get_base_address!(recipient, "unified"), @@ -97,8 +96,6 @@ async fn dont_write_unconfirmed() { &(0 as u64) ); check_client_balances!(loaded_client, o: 100_000 s: 0 t: 0 ); - drop(loaded_client); - drop(child_process_handler); } #[tokio::test] @@ -110,8 +107,8 @@ async fn load_and_parse_different_wallet_versions() { #[tokio::test] async fn list_transactions_include_foreign() { let wallet_nym = format!( - "{}/zingocli/tests/data/wallets/missing_data_test/zingo-wallet.dat", - get_cargo_manifest_dir_parent().to_string_lossy() + "{}/tests/data/wallets/missing_data_test/zingo-wallet.dat", + get_cargo_manifest_dir().to_string_lossy() ); let wallet_path = Path::new(&wallet_nym); let wallet_dir = wallet_path.parent().unwrap(); @@ -140,7 +137,7 @@ async fn list_transactions_include_foreign() { #[traced_test] async fn send_to_self_with_no_user_specified_memo_does_not_cause_error() { tracing_log::LogTracer::init().unwrap(); - let (regtest_manager, child_process_handler, _faucet, recipient, _txid) = + let (regtest_manager, _cph, _faucet, recipient, _txid) = scenarios::faucet_prefunded_orchard_recipient(100_000).await; recipient .do_send(vec![( @@ -174,13 +171,11 @@ async fn send_to_self_with_no_user_specified_memo_does_not_cause_error() { assert!(!logs_contain( "Received memo indicating you sent to an address you don't have on record." )); - drop(child_process_handler) } #[tokio::test] async fn factor_do_shield_to_call_do_send() { - let (regtest_manager, _child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, __cph, faucet, recipient) = scenarios::faucet_recipient().await; zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 2) .await .unwrap(); @@ -196,8 +191,7 @@ async fn factor_do_shield_to_call_do_send() { #[tokio::test] async fn sapling_dust_fee_collection() { - let (regtest_manager, _child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, __cph, faucet, recipient) = scenarios::faucet_recipient().await; let recipient_sapling = get_base_address!(recipient, "sapling"); let recipient_unified = get_base_address!(recipient, "unified"); check_client_balances!(recipient, o: 0 s: 0 t: 0); @@ -338,7 +332,7 @@ async fn test_scanning_in_watch_only_mode() { // - wallet will not detect funds on internal addresses // see: https://github.com/zingolabs/zingolib/issues/246 - let (regtest_manager, child_process_handler, mut client_builder) = scenarios::custom_clients(); + let (regtest_manager, _cph, mut client_builder) = scenarios::custom_clients(); let faucet = client_builder.build_new_faucet(0, false).await; let original_recipient = client_builder .build_newseed_client(HOSPITAL_MUSEUM_SEED.to_string(), 0, false) @@ -432,7 +426,6 @@ async fn test_scanning_in_watch_only_mode() { Err("Wallet is in watch-only mode a thus it cannot spend".to_string()) ); } - drop(child_process_handler); } #[tokio::test] @@ -440,7 +433,7 @@ async fn zcashd_sapling_commitment_tree() { // TODO: Make this test assert something, what is this a test of? // TODO: Add doc-comment explaining what constraints this test // enforces - let (regtest_manager, child_process_handler, _faucet) = scenarios::faucet().await; + let (regtest_manager, _cph, _faucet) = scenarios::faucet().await; let trees = regtest_manager .get_cli_handle() .args(["z_gettreestate", "1"]) @@ -449,7 +442,6 @@ async fn zcashd_sapling_commitment_tree() { let trees = json::parse(&String::from_utf8_lossy(&trees.stdout)); let pretty_trees = json::stringify_pretty(trees.unwrap(), 4); println!("{}", pretty_trees); - drop(child_process_handler); } #[tokio::test] @@ -460,8 +452,7 @@ async fn verify_old_wallet_uses_server_height_in_send() { // interrupting send, it made it immediately obvious that this was // the wrong height to use! The correct height is the // "mempool height" which is the server_height + 1 - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; // Ensure that the client has confirmed spendable funds zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 5) .await @@ -483,7 +474,6 @@ async fn verify_old_wallet_uses_server_height_in_send() { )]) .await .unwrap(); - drop(child_process_handler); } #[tokio::test] async fn actual_empty_zcashd_sapling_commitment_tree() { @@ -496,7 +486,7 @@ async fn actual_empty_zcashd_sapling_commitment_tree() { "ae2935f1dfd8a24aed7c70df7de3a668eb7a49b1319880dde2bbd9031ae5d82f"; let finalstates = "000000"; // Setup - let (regtest_manager, child_process_handler, _client) = scenarios::basic_no_spendable().await; + let (regtest_manager, _cph, _client) = scenarios::basic_no_spendable().await; // Execution: let trees = regtest_manager .get_cli_handle() @@ -530,23 +520,20 @@ async fn actual_empty_zcashd_sapling_commitment_tree() { trees.as_ref().unwrap()["orchard"]["commitments"]["finalState"] ); //dbg!(std::process::Command::new("grpcurl").args(["-plaintext", "127.0.0.1:9067"])); - drop(child_process_handler); } #[tokio::test] async fn mine_sapling_to_self() { - let (regtest_manager, child_process_handler, faucet) = scenarios::faucet().await; + let (regtest_manager, _cph, faucet) = scenarios::faucet().await; zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 1) .await .unwrap(); check_client_balances!(faucet, o: 0u64 s: 1_250_000_000u64 t: 0u64); - drop(child_process_handler); } #[tokio::test] async fn unspent_notes_are_not_saved() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 1) .await .unwrap(); @@ -604,7 +591,6 @@ async fn unspent_notes_are_not_saved() { let mut faucet_copy_transactions = faucet_copy.do_list_transactions().await; faucet_copy_transactions.pop(); assert_eq!(faucet_transactions, faucet_copy_transactions); - drop(child_process_handler); } #[tokio::test] @@ -613,7 +599,7 @@ async fn send_mined_sapling_to_orchard() { // debiting unverified_orchard_balance and crediting verified_orchard_balance. The debit amount is // consistent with all the notes in the relevant block changing state. // NOTE that the balance doesn't give insight into the distribution across notes. - let (regtest_manager, child_process_handler, faucet) = scenarios::faucet().await; + let (regtest_manager, _cph, faucet) = scenarios::faucet().await; zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 1) .await .unwrap(); @@ -639,7 +625,6 @@ async fn send_mined_sapling_to_orchard() { balance["verified_orchard_balance"], 625_000_000 - u64::from(MINIMUM_FEE) ); - drop(child_process_handler); } fn extract_value_as_u64(input: &JsonValue) -> u64 { @@ -654,8 +639,7 @@ async fn note_selection_order() { // In addition to testing the order in which notes are selected this test: // * sends to a sapling address // * sends back to the original sender's UA - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 5) .await @@ -757,7 +741,6 @@ async fn note_selection_order() { ); // More explicit than ignoring the unused variable, we only care about this in order to drop it - drop(child_process_handler); } #[tokio::test] @@ -765,7 +748,7 @@ async fn note_selection_order() { #[ignore] async fn from_t_z_o_tz_to_zo_tzo_to_orchard() { // Test all possible promoting note source combinations - let (regtest_manager, child_process_handler, mut client_builder) = scenarios::custom_clients(); + let (regtest_manager, _cph, mut client_builder) = scenarios::custom_clients(); let sapling_faucet = client_builder.build_new_faucet(0, false).await; let pool_migration_client = client_builder .build_newseed_client(HOSPITAL_MUSEUM_SEED.to_string(), 0, false) @@ -905,14 +888,11 @@ async fn from_t_z_o_tz_to_zo_tzo_to_orchard() { Some((String::from("fee"), u64::from((MINIMUM_FEE * 13).unwrap()))) ); assert!(total_value_to_addrs_iter.next().is_none()); - - drop(child_process_handler); } #[tokio::test] async fn send_orchard_back_and_forth() { // setup - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; let block_reward = 625_000_000u64; let faucet_to_recipient_amount = 20_000u64; let recipient_to_faucet_amount = 5_000u64; @@ -970,13 +950,11 @@ async fn send_orchard_back_and_forth() { o: faucet_final_orch s: faucet_final_block t: 0 ); check_client_balances!(recipient, o: recipient_final_orch s: 0 t: 0); - drop(child_process_handler); } #[tokio::test] async fn diversified_addresses_receive_funds_in_best_pool() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; for code in ["o", "zo", "z"] { recipient.do_new_address(code).await.unwrap(); } @@ -1004,15 +982,13 @@ async fn diversified_addresses_receive_funds_in_best_pool() { "transparent_balance": 0 } ); - // Unneeded, but more explicit than having child_process_handler be an + // Unneeded, but more explicit than having _cph be an // unused variable - drop(child_process_handler); } #[tokio::test] async fn rescan_still_have_outgoing_metadata() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; faucet .do_send(vec![( get_base_address!(recipient, "sapling").as_str(), @@ -1028,13 +1004,11 @@ async fn rescan_still_have_outgoing_metadata() { faucet.do_rescan().await.unwrap(); let post_rescan_transactions = faucet.do_list_transactions().await; assert_eq!(transactions, post_rescan_transactions); - - drop(child_process_handler); } #[tokio::test] async fn rescan_still_have_outgoing_metadata_with_sends_to_self() { - let (regtest_manager, child_process_handler, faucet) = scenarios::faucet().await; + let (regtest_manager, _cph, faucet) = scenarios::faucet().await; let sapling_addr = get_base_address!(faucet, "sapling"); for memo in [None, Some("foo")] { faucet @@ -1076,7 +1050,6 @@ async fn rescan_still_have_outgoing_metadata_with_sends_to_self() { } assert_eq!(field.len(), post_rescan_notes[field_name].len()); } - drop(child_process_handler); } /// An arbitrary number of diversified addresses may be generated @@ -1086,7 +1059,7 @@ async fn rescan_still_have_outgoing_metadata_with_sends_to_self() { /// is capable of recovering the diversified _receiver_. #[tokio::test] async fn handling_of_nonregenerated_diversified_addresses_after_seed_restore() { - let (regtest_manager, child_process_handler, mut client_builder) = scenarios::custom_clients(); + let (regtest_manager, _cph, mut client_builder) = scenarios::custom_clients(); let faucet = client_builder.build_new_faucet(0, false).await; faucet.do_sync(false).await.unwrap(); let seed_phrase_of_recipient1 = zcash_primitives::zip339::Mnemonic::from_entropy([1; 32]) @@ -1207,12 +1180,11 @@ async fn handling_of_nonregenerated_diversified_addresses_after_seed_restore() { recipient_restored.do_seed_phrase().await.unwrap() }; assert_eq!(seed_of_recipient, seed_of_recipient_restored); - drop(child_process_handler); } #[tokio::test] async fn ensure_taddrs_from_old_seeds_work() { - let (_regtest_manager, child_process_handler, mut client_builder) = scenarios::custom_clients(); + let (_regtest_manager, _cph, mut client_builder) = scenarios::custom_clients(); // The first taddr generated on commit 9e71a14eb424631372fd08503b1bd83ea763c7fb let transparent_address = "tmFLszfkjgim4zoUMAXpuohnFBAKy99rr2i"; @@ -1224,13 +1196,11 @@ async fn ensure_taddrs_from_old_seeds_work() { get_base_address!(client_b, "transparent"), transparent_address ); - drop(child_process_handler); } #[tokio::test] async fn t_incoming_t_outgoing_disallowed() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; // 2. Get an incoming transaction to a t address let taddr = get_base_address!(recipient, "transparent"); @@ -1259,13 +1229,11 @@ async fn t_incoming_t_outgoing_disallowed() { .await .unwrap_err(); assert_eq!(sent_transaction_error, "Insufficient verified shielded funds. Have 0 zats, need 30000 zats. NOTE: funds need at least 1 confirmations before they can be spent. Transparent funds must be shielded before they can be spent. If you are trying to spend transparent funds, please use the shield button and try again in a few minutes"); - drop(child_process_handler); } #[tokio::test] async fn send_to_ua_saves_full_ua_in_wallet() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; //utils::increase_height_and_sync_client(®test_manager, &faucet, 5).await; let recipient_unified_address = get_base_address!(recipient, "unified"); let sent_value = 50_000; @@ -1304,13 +1272,11 @@ async fn send_to_ua_saves_full_ua_in_wallet() { json::stringify_pretty(list.clone(), 4), json::stringify_pretty(new_list.clone(), 4) ); - drop(child_process_handler); } #[tokio::test] async fn self_send_to_t_displays_as_one_transaction() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; let recipient_unified_address = get_base_address!(recipient, "unified"); let sent_value = 50_000; faucet @@ -1377,7 +1343,6 @@ async fn self_send_to_t_displays_as_one_transaction() { .members() .map(|transaction| transaction["txid"].as_str()); assert!(itertools::Itertools::all_unique(&mut txids)); - drop(child_process_handler); } // Burn-to regtest address generated by `zcash-cli getnewaddress` @@ -1403,8 +1368,7 @@ async fn sapling_to_sapling_scan_together() { // Constraints: // 1. SpendK_S controls start - spend funds // 2. SpendK_R controls 0 + spend funds - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; // Give the faucet a block reward zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 1) @@ -1453,8 +1417,6 @@ async fn sapling_to_sapling_scan_together() { list[1]["outgoing_metadata"][0]["value"].as_u64().unwrap(), spent_value ); - - drop(child_process_handler); } #[tokio::test] @@ -1531,7 +1493,7 @@ async fn load_wallet_from_v26_dat_file() { async fn mempool_and_balance() { let value = 100_000; - let (regtest_manager, child_process_handler, faucet, recipient, _txid) = + let (regtest_manager, _cph, faucet, recipient, _txid) = scenarios::faucet_prefunded_orchard_recipient(value).await; let bal = recipient.do_balance().await; @@ -1580,14 +1542,12 @@ async fn mempool_and_balance() { assert_eq!(bal["orchard_balance"].as_u64().unwrap(), new_bal); assert_eq!(bal["verified_orchard_balance"].as_u64().unwrap(), new_bal); assert_eq!(bal["unverified_orchard_balance"].as_u64().unwrap(), 0); - - drop(child_process_handler); } #[tokio::test] async fn witness_clearing() { let value: u64 = 100_000; - let (regtest_manager, child_process_handler, faucet, recipient, txid) = + let (regtest_manager, _cph, faucet, recipient, txid) = scenarios::faucet_prefunded_orchard_recipient(value).await; dbg!(&txid); let mut txid_bytes = <[u8; 32]>::try_from(hex::decode(txid).unwrap()).unwrap(); @@ -1685,8 +1645,6 @@ async fn witness_clearing() { .witnesses .clone(); assert_eq!(witnesses.len(), 0); - - drop(child_process_handler); } #[tokio::test] @@ -1697,7 +1655,7 @@ async fn mempool_clearing() { } } let value = 100_000; - let (regtest_manager, child_process_handler, faucet, recipient, orig_transaction_id) = + let (regtest_manager, _cph, faucet, recipient, orig_transaction_id) = scenarios::faucet_prefunded_orchard_recipient(value).await; assert_eq!( @@ -1732,8 +1690,8 @@ async fn mempool_clearing() { ); // Turn zcashd off and on again, to write down the blocks - drop(child_process_handler); // Turn off zcashd and lightwalletd - let child_process_handler = regtest_manager.launch(false).unwrap(); + drop(_cph); // turn off zcashd and lightwalletd + let _cph = regtest_manager.launch(false).unwrap(); log::debug!( "new zcashd chain info {}", std::str::from_utf8( @@ -1803,7 +1761,7 @@ async fn mempool_clearing() { assert_eq!(post_sync_notes_before, notes_before); assert_eq!(post_sync_transactions_before, transactions_before); - drop(child_process_handler); // Turn off zcashd and lightwalletd + drop(_cph); // Turn off zcashd and lightwalletd // 5. check that the sent transaction is correctly marked in the client let transactions = recipient.do_list_transactions().await; @@ -1841,7 +1799,7 @@ async fn mempool_clearing() { .to_string_lossy() .to_string() ); - let child_process_handler = regtest_manager.launch(false).unwrap(); + let _cph = regtest_manager.launch(false).unwrap(); let notes_after = recipient.do_list_notes(true).await; let transactions_after = recipient.do_list_transactions().await; @@ -1893,7 +1851,6 @@ async fn mempool_clearing() { .unwrap()); assert_eq!(notes["pending_orchard_notes"].len(), 0); assert_eq!(transactions.len(), 1); - drop(child_process_handler); } pub mod framework_validation { @@ -1961,20 +1918,18 @@ pub mod framework_validation { .output() .expect("to remove ligthwalletd log"); drop(child_process_handler); // Turn off zcashd and lightwalletd - let child_process_handler2 = regtest_manager.launch(false).unwrap(); + let _cph2 = regtest_manager.launch(false).unwrap(); log_field_from_zcashd!( regtest_manager, "new zcashd blocks: {}", "getblockchaininfo", "blocks", ); - drop(child_process_handler2); } } #[tokio::test] async fn sapling_incoming_sapling_outgoing() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; let value = 100_000; // 2. Send an incoming transaction to fill the wallet @@ -2171,14 +2126,12 @@ async fn sapling_incoming_sapling_outgoing() { .unwrap(), 3 ); - - drop(child_process_handler); } #[tokio::test] async fn aborted_resync() { let zvalue = 100_000; - let (regtest_manager, child_process_handler, faucet, recipient, _txid) = + let (regtest_manager, _cph, faucet, recipient, _txid) = scenarios::faucet_prefunded_orchard_recipient(zvalue).await; zingo_testutils::increase_height_and_sync_client(®test_manager, &recipient, 15) @@ -2272,15 +2225,13 @@ async fn aborted_resync() { assert_eq!(hex::encode(before_bytes), hex::encode(after_bytes)); } - - drop(child_process_handler); } #[tokio::test] async fn zero_value_change() { // 2. Send an incoming transaction to fill the wallet let value = 100_000; - let (regtest_manager, child_process_handler, faucet, recipient, _txid) = + let (regtest_manager, _cph, faucet, recipient, _txid) = scenarios::faucet_prefunded_orchard_recipient(value).await; let sent_value = value - u64::from(MINIMUM_FEE); @@ -2317,13 +2268,12 @@ async fn zero_value_change() { ); check_client_balances!(recipient, o: 0 s: 0 t: 0); - drop(child_process_handler); } #[tokio::test] async fn dust_sends_change_correctly() { let value = 100_000_000; - let (regtest_manager, child_process_handler, faucet, recipient, _txid) = + let (regtest_manager, _cph, faucet, recipient, _txid) = scenarios::faucet_prefunded_orchard_recipient(value).await; // Send of less that transaction fee @@ -2343,13 +2293,12 @@ async fn dust_sends_change_correctly() { println!("{}", recipient.do_list_transactions().await.pretty(4)); println!("{}", recipient.do_balance().await.pretty(4)); - drop(child_process_handler); } #[tokio::test] async fn zero_value_receipts() { let value = 100_000_000; - let (regtest_manager, child_process_handler, faucet, recipient, _txid) = + let (regtest_manager, _cph, faucet, recipient, _txid) = scenarios::faucet_prefunded_orchard_recipient(value).await; let sent_value = 0; @@ -2379,12 +2328,10 @@ async fn zero_value_receipts() { "{}", JsonValue::from(recipient.do_list_txsummaries().await).pretty(4) ); - drop(child_process_handler); } #[tokio::test] async fn by_address_finsight() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; let base_uaddress = get_base_address!(recipient, "unified"); zingo_testutils::increase_height_and_sync_client(®test_manager, &faucet, 2) .await @@ -2409,14 +2356,11 @@ async fn by_address_finsight() { JsonValue::from(faucet.do_total_memobytes_to_address().await)[&base_uaddress].pretty(4), "6".to_string() ); - - drop(child_process_handler); } #[tokio::test] async fn shield_sapling() { - let (regtest_manager, child_process_handler, faucet, recipient) = - scenarios::faucet_recipient().await; + let (regtest_manager, _cph, faucet, recipient) = scenarios::faucet_recipient().await; let sapling_dust = 100; let _sent_transaction_id = faucet @@ -2482,8 +2426,6 @@ async fn shield_sapling() { .unwrap(); println!("{}", recipient.do_balance().await.pretty(4)); - - drop(child_process_handler); } #[tokio::test] @@ -2496,7 +2438,7 @@ async fn send_to_transparent_and_sapling_maintain_balance() { let second_send_to_sapling = 20_000; let third_send_to_transparent = 20_000; - let (ref regtest_manager, child_process_handler, faucet, recipient, _txid) = + let (ref regtest_manager, _cph, faucet, recipient, _txid) = scenarios::faucet_prefunded_orchard_recipient(recipient_initial_funds).await; let expected_transactions = json::parse( @@ -2755,8 +2697,6 @@ async fn send_to_transparent_and_sapling_maintain_balance() { .members() .any(|t2| check_transaction_equality(transaction, t2))); } - - drop(child_process_handler) } pub const TEST_SEED: &str = "chimney better bulb horror rebuild whisper improve intact letter giraffe brave rib appear bulk aim burst snap salt hill sad merge tennis phrase raise";