@@ -88,7 +88,6 @@ pub struct Args {
88
88
#[ serde( rename_all = "lowercase" ) ]
89
89
pub enum ExtendedNetwork {
90
90
Mainnet ,
91
- MainnetAlpha ,
92
91
Testnet ,
93
92
Testnet4 ,
94
93
Signet ,
@@ -98,7 +97,7 @@ pub enum ExtendedNetwork {
98
97
impl ExtendedNetwork {
99
98
pub fn fallback_network ( & self ) -> Network {
100
99
match self {
101
- ExtendedNetwork :: Mainnet | ExtendedNetwork :: MainnetAlpha => Network :: Bitcoin ,
100
+ ExtendedNetwork :: Mainnet => Network :: Bitcoin ,
102
101
ExtendedNetwork :: Testnet => Network :: Testnet ,
103
102
ExtendedNetwork :: Signet => Network :: Signet ,
104
103
ExtendedNetwork :: Regtest => Network :: Regtest ,
@@ -110,7 +109,7 @@ impl ExtendedNetwork {
110
109
impl Args {
111
110
/// Configures spaced node by processing command line arguments
112
111
/// and configuration files
113
- pub async fn configure ( ) -> anyhow:: Result < Spaced > {
112
+ pub async fn configure ( shutdown : tokio :: sync :: broadcast :: Receiver < ( ) > ) -> anyhow:: Result < Spaced > {
114
113
let mut args = Args :: merge_args_config ( None ) ;
115
114
let default_dirs = get_default_node_dirs ( ) ;
116
115
@@ -170,7 +169,7 @@ impl Args {
170
169
!args. bitcoin_rpc_light
171
170
) ;
172
171
173
- let genesis = Spaced :: genesis ( & rpc, args. chain ) . await ?;
172
+ let genesis = Spaced :: genesis ( & rpc, args. chain , shutdown ) . await ?;
174
173
175
174
fs:: create_dir_all ( data_dir. clone ( ) ) ?;
176
175
@@ -282,7 +281,7 @@ pub fn safe_exit(code: i32) -> ! {
282
281
283
282
pub fn default_bitcoin_rpc_url ( network : & ExtendedNetwork ) -> & ' static str {
284
283
match network {
285
- ExtendedNetwork :: Mainnet | ExtendedNetwork :: MainnetAlpha => "http://127.0.0.1:8332" ,
284
+ ExtendedNetwork :: Mainnet => "http://127.0.0.1:8332" ,
286
285
ExtendedNetwork :: Testnet4 => "http://127.0.0.1:48332" ,
287
286
ExtendedNetwork :: Signet => "http://127.0.0.1:38332" ,
288
287
ExtendedNetwork :: Testnet => "http://127.0.0.1:18332" ,
@@ -380,7 +379,6 @@ impl Display for ExtendedNetwork {
380
379
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
381
380
let str = match self {
382
381
ExtendedNetwork :: Mainnet => "mainnet" . to_string ( ) ,
383
- ExtendedNetwork :: MainnetAlpha => "mainnet-alpha" . to_string ( ) ,
384
382
ExtendedNetwork :: Testnet => "testnet" . to_string ( ) ,
385
383
ExtendedNetwork :: Testnet4 => "testnet4" . to_string ( ) ,
386
384
ExtendedNetwork :: Signet => "signet" . to_string ( ) ,
@@ -393,7 +391,6 @@ impl Display for ExtendedNetwork {
393
391
pub fn default_spaces_rpc_port ( chain : & ExtendedNetwork ) -> u16 {
394
392
match chain {
395
393
ExtendedNetwork :: Mainnet => 7225 ,
396
- ExtendedNetwork :: MainnetAlpha => 7225 ,
397
394
ExtendedNetwork :: Testnet4 => 7224 ,
398
395
ExtendedNetwork :: Testnet => 7223 ,
399
396
ExtendedNetwork :: Signet => 7221 ,
0 commit comments