Skip to content

Commit

Permalink
[node] Add support for regtest network to nakamoto-node (#151)
Browse files Browse the repository at this point in the history
Added regtest option for nakamoto-node in order to connect to regtest network. For example:
# cargo run --release -p nakamoto-node -- --log debug  --regtest --connect 127.0.0.1:18444
  • Loading branch information
lazysatoshi committed Mar 1, 2024
1 parent bb52d6e commit ff73e73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ pub struct Options {
#[argh(switch)]
pub signet: bool,

/// use the bitcoin regtest network (default: false)
#[argh(switch)]
pub regtest: bool,

/// only connect to IPv4 addresses (default: false)
#[argh(switch, short = '4')]
pub ipv4: bool,
Expand Down Expand Up @@ -57,6 +61,8 @@ fn main() {
Network::Testnet
} else if opts.signet {
Network::Signet
} else if opts.regtest {
Network::Regtest
} else {
Network::Mainnet
};
Expand Down

0 comments on commit ff73e73

Please sign in to comment.