Activate mainnet for the CLI

This includes testing CLI commandline args
Clap's `default_value_with` actually did not work on `Subcommand`s because the parent's flags were not picked up.
This was fixed by changing parameters dependent on testnet/mainnet to options.
This problem should have been detected by tests, that's why the command line parameter tests were finally (re-)added.

Thanks to @rishflab for some pre-work for this.
This commit is contained in:
Daniel Karzel 2021-05-11 16:52:40 +10:00
parent 1cdc23de32
commit 69cf12620d
No known key found for this signature in database
GPG key ID: 30C3FC2E438ADB6E
3 changed files with 813 additions and 114 deletions

View file

@ -3,7 +3,7 @@ use std::cmp::max;
use std::time::Duration;
use time::NumericalStdDurationShort;
#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct Config {
pub bitcoin_lock_confirmed_timeout: Duration,
pub bitcoin_finality_confirmations: u32,