Skip to content

Commit 8ed817e

Browse files
committed
fix: make regtest default on wallet_example_rpc
1 parent 739b54f commit 8ed817e

File tree

2 files changed

+18
-29
lines changed

2 files changed

+18
-29
lines changed

example-crates/example_wallet_rpc/README.md

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,32 @@
33
```
44
$ cargo run --bin example_wallet_rpc -- --help
55
6-
example_wallet_rpc 0.1.0
76
Bitcoind RPC example using `bdk_wallet::Wallet`
87
9-
USAGE:
10-
example_wallet_rpc [OPTIONS] <DESCRIPTOR> [CHANGE_DESCRIPTOR]
8+
Usage: example_wallet_rpc [OPTIONS] <DESCRIPTOR> <CHANGE_DESCRIPTOR>
119
12-
ARGS:
13-
<DESCRIPTOR> Wallet descriptor [env: DESCRIPTOR=]
14-
<CHANGE_DESCRIPTOR> Wallet change descriptor [env: CHANGE_DESCRIPTOR=]
10+
Arguments:
11+
<DESCRIPTOR> Wallet descriptor [env: DESCRIPTOR=]
12+
<CHANGE_DESCRIPTOR> Wallet change descriptor [env: CHANGE_DESCRIPTOR=]
1513
16-
OPTIONS:
17-
--db-path <DB_PATH>
18-
Where to store wallet data [env: BDK_DB_PATH=] [default: .bdk_wallet_rpc_example.db]
14+
Options:
15+
--start-height <START_HEIGHT> Earliest block height to start sync from [env: START_HEIGHT=] [default: 0]
1916
20-
-h, --help
21-
Print help information
17+
--network <NETWORK> Bitcoin network to connect to [env: BITCOIN_NETWORK=] [default: regtest]
2218
23-
--network <NETWORK>
24-
Bitcoin network to connect to [env: BITCOIN_NETWORK=] [default: testnet]
19+
--db-path <DB_PATH> Where to store wallet data [env: BDK_DB_PATH=] [default: .bdk_wallet_rpc_example.db]
2520
26-
--rpc-cookie <RPC_COOKIE>
27-
RPC auth cookie file [env: RPC_COOKIE=]
21+
--url <URL> RPC URL [env: RPC_URL=] [default: 127.0.0.1:18443]
2822
29-
--rpc-pass <RPC_PASS>
30-
RPC auth password [env: RPC_PASS=]
23+
--rpc-cookie <RPC_COOKIE> RPC auth cookie file [env: RPC_COOKIE=]
3124
32-
--rpc-user <RPC_USER>
33-
RPC auth username [env: RPC_USER=]
25+
--rpc-user <RPC_USER> RPC auth username [env: RPC_USER=]
3426
35-
--start-height <START_HEIGHT>
36-
Earliest block height to start sync from [env: START_HEIGHT=] [default: 481824]
27+
--rpc-pass <RPC_PASS> RPC auth password [env: RPC_PASS=]
3728
38-
--url <URL>
39-
RPC URL [env: RPC_URL=] [default: 127.0.0.1:8332]
40-
41-
-V, --version
42-
Print version information
29+
-h, --help Print help
30+
31+
-V, --version Print version
4332
4433
```
4534

example-crates/example_wallet_rpc/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ pub struct Args {
2727
#[clap(env = "CHANGE_DESCRIPTOR")]
2828
pub change_descriptor: String,
2929
/// Earliest block height to start sync from
30-
#[clap(env = "START_HEIGHT", long, default_value = "481824")]
30+
#[clap(env = "START_HEIGHT", long, default_value = "0")]
3131
pub start_height: u32,
3232
/// Bitcoin network to connect to
33-
#[clap(env = "BITCOIN_NETWORK", long, default_value = "testnet")]
33+
#[clap(env = "BITCOIN_NETWORK", long, default_value = "regtest")]
3434
pub network: Network,
3535
/// Where to store wallet data
3636
#[clap(
@@ -41,7 +41,7 @@ pub struct Args {
4141
pub db_path: PathBuf,
4242

4343
/// RPC URL
44-
#[clap(env = "RPC_URL", long, default_value = "127.0.0.1:8332")]
44+
#[clap(env = "RPC_URL", long, default_value = "127.0.0.1:18443")]
4545
pub url: String,
4646
/// RPC auth cookie file
4747
#[clap(env = "RPC_COOKIE", long)]

0 commit comments

Comments
 (0)