@@ -88,7 +88,6 @@ pub struct Args {
8888#[ serde( rename_all = "lowercase" ) ]
8989pub enum ExtendedNetwork {
9090 Mainnet ,
91- MainnetAlpha ,
9291 Testnet ,
9392 Testnet4 ,
9493 Signet ,
@@ -98,7 +97,7 @@ pub enum ExtendedNetwork {
9897impl ExtendedNetwork {
9998 pub fn fallback_network ( & self ) -> Network {
10099 match self {
101- ExtendedNetwork :: Mainnet | ExtendedNetwork :: MainnetAlpha => Network :: Bitcoin ,
100+ ExtendedNetwork :: Mainnet => Network :: Bitcoin ,
102101 ExtendedNetwork :: Testnet => Network :: Testnet ,
103102 ExtendedNetwork :: Signet => Network :: Signet ,
104103 ExtendedNetwork :: Regtest => Network :: Regtest ,
@@ -110,7 +109,7 @@ impl ExtendedNetwork {
110109impl Args {
111110 /// Configures spaced node by processing command line arguments
112111 /// and configuration files
113- pub async fn configure ( ) -> anyhow:: Result < Spaced > {
112+ pub async fn configure ( shutdown : tokio :: sync :: broadcast :: Receiver < ( ) > ) -> anyhow:: Result < Spaced > {
114113 let mut args = Args :: merge_args_config ( None ) ;
115114 let default_dirs = get_default_node_dirs ( ) ;
116115
@@ -170,7 +169,7 @@ impl Args {
170169 !args. bitcoin_rpc_light
171170 ) ;
172171
173- let genesis = Spaced :: genesis ( & rpc, args. chain ) . await ?;
172+ let genesis = Spaced :: genesis ( & rpc, args. chain , shutdown ) . await ?;
174173
175174 fs:: create_dir_all ( data_dir. clone ( ) ) ?;
176175
@@ -282,7 +281,7 @@ pub fn safe_exit(code: i32) -> ! {
282281
283282pub fn default_bitcoin_rpc_url ( network : & ExtendedNetwork ) -> & ' static str {
284283 match network {
285- ExtendedNetwork :: Mainnet | ExtendedNetwork :: MainnetAlpha => "http://127.0.0.1:8332" ,
284+ ExtendedNetwork :: Mainnet => "http://127.0.0.1:8332" ,
286285 ExtendedNetwork :: Testnet4 => "http://127.0.0.1:48332" ,
287286 ExtendedNetwork :: Signet => "http://127.0.0.1:38332" ,
288287 ExtendedNetwork :: Testnet => "http://127.0.0.1:18332" ,
@@ -380,7 +379,6 @@ impl Display for ExtendedNetwork {
380379 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
381380 let str = match self {
382381 ExtendedNetwork :: Mainnet => "mainnet" . to_string ( ) ,
383- ExtendedNetwork :: MainnetAlpha => "mainnet-alpha" . to_string ( ) ,
384382 ExtendedNetwork :: Testnet => "testnet" . to_string ( ) ,
385383 ExtendedNetwork :: Testnet4 => "testnet4" . to_string ( ) ,
386384 ExtendedNetwork :: Signet => "signet" . to_string ( ) ,
@@ -393,7 +391,6 @@ impl Display for ExtendedNetwork {
393391pub fn default_spaces_rpc_port ( chain : & ExtendedNetwork ) -> u16 {
394392 match chain {
395393 ExtendedNetwork :: Mainnet => 7225 ,
396- ExtendedNetwork :: MainnetAlpha => 7225 ,
397394 ExtendedNetwork :: Testnet4 => 7224 ,
398395 ExtendedNetwork :: Testnet => 7223 ,
399396 ExtendedNetwork :: Signet => 7221 ,
0 commit comments