From 8ed817e716f1b4d473f1c6ec29e11e1f7c0e9356 Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 5 Mar 2025 17:23:14 -0300 Subject: [PATCH] fix: make regtest default on wallet_example_rpc --- example-crates/example_wallet_rpc/README.md | 41 +++++++------------ example-crates/example_wallet_rpc/src/main.rs | 6 +-- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/example-crates/example_wallet_rpc/README.md b/example-crates/example_wallet_rpc/README.md index ea2918aa2..0e88ffba8 100644 --- a/example-crates/example_wallet_rpc/README.md +++ b/example-crates/example_wallet_rpc/README.md @@ -3,43 +3,32 @@ ``` $ cargo run --bin example_wallet_rpc -- --help -example_wallet_rpc 0.1.0 Bitcoind RPC example using `bdk_wallet::Wallet` -USAGE: - example_wallet_rpc [OPTIONS] [CHANGE_DESCRIPTOR] +Usage: example_wallet_rpc [OPTIONS] -ARGS: - Wallet descriptor [env: DESCRIPTOR=] - Wallet change descriptor [env: CHANGE_DESCRIPTOR=] +Arguments: + Wallet descriptor [env: DESCRIPTOR=] + Wallet change descriptor [env: CHANGE_DESCRIPTOR=] -OPTIONS: - --db-path - Where to store wallet data [env: BDK_DB_PATH=] [default: .bdk_wallet_rpc_example.db] +Options: + --start-height Earliest block height to start sync from [env: START_HEIGHT=] [default: 0] - -h, --help - Print help information + --network Bitcoin network to connect to [env: BITCOIN_NETWORK=] [default: regtest] - --network - Bitcoin network to connect to [env: BITCOIN_NETWORK=] [default: testnet] + --db-path Where to store wallet data [env: BDK_DB_PATH=] [default: .bdk_wallet_rpc_example.db] - --rpc-cookie - RPC auth cookie file [env: RPC_COOKIE=] + --url RPC URL [env: RPC_URL=] [default: 127.0.0.1:18443] - --rpc-pass - RPC auth password [env: RPC_PASS=] + --rpc-cookie RPC auth cookie file [env: RPC_COOKIE=] - --rpc-user - RPC auth username [env: RPC_USER=] + --rpc-user RPC auth username [env: RPC_USER=] - --start-height - Earliest block height to start sync from [env: START_HEIGHT=] [default: 481824] + --rpc-pass RPC auth password [env: RPC_PASS=] - --url - RPC URL [env: RPC_URL=] [default: 127.0.0.1:8332] - - -V, --version - Print version information + -h, --help Print help + + -V, --version Print version ``` diff --git a/example-crates/example_wallet_rpc/src/main.rs b/example-crates/example_wallet_rpc/src/main.rs index 204224bcb..52531021b 100644 --- a/example-crates/example_wallet_rpc/src/main.rs +++ b/example-crates/example_wallet_rpc/src/main.rs @@ -27,10 +27,10 @@ pub struct Args { #[clap(env = "CHANGE_DESCRIPTOR")] pub change_descriptor: String, /// Earliest block height to start sync from - #[clap(env = "START_HEIGHT", long, default_value = "481824")] + #[clap(env = "START_HEIGHT", long, default_value = "0")] pub start_height: u32, /// Bitcoin network to connect to - #[clap(env = "BITCOIN_NETWORK", long, default_value = "testnet")] + #[clap(env = "BITCOIN_NETWORK", long, default_value = "regtest")] pub network: Network, /// Where to store wallet data #[clap( @@ -41,7 +41,7 @@ pub struct Args { pub db_path: PathBuf, /// RPC URL - #[clap(env = "RPC_URL", long, default_value = "127.0.0.1:8332")] + #[clap(env = "RPC_URL", long, default_value = "127.0.0.1:18443")] pub url: String, /// RPC auth cookie file #[clap(env = "RPC_COOKIE", long)]