@@ -57,23 +57,30 @@ def setup_network(self, split=False):
5757 "-port=" + str (p2p_port (0 )),
5858 "-rpcport=" + str (rpc_port (0 )),
5959 "-addresstype=legacy" ,
60- "-deprecatedrpc=validateaddress"
60+ "-deprecatedrpc=validateaddress" ,
61+ "-bech32_hrp=sb" ,
62+ "-pchmessagestart=F0C7706A" ,
63+ "-pubkeyprefix=125" ,
64+ "-scriptprefix=87" ,
65+ "-secretprefix=217" ,
66+ "-extpubkeyprefix=043587CF" ,
67+ "-extprvkeyprefix=04358394" ,
6168 ]
62- temp_node = start_node (0 , self .options .tmpdir , temp_args , binary = self .binary , chain = 'signet ' , cookie_auth = True )
69+ temp_node = start_node (0 , self .options .tmpdir , temp_args , binary = self .binary , chain = 'temp ' , cookie_auth = True )
6370 addr = temp_node .getnewaddress ()
6471 k = key .CECKey ()
6572 pub = temp_node .validateaddress (addr )["pubkey" ]
6673 k .set_pubkey (hex_str_to_bytes (pub ))
6774 pubkey = key .CPubKey (k .get_pubkey ())
6875 wif = temp_node .dumpprivkey (addr )
6976 stop_node (temp_node , 0 )
70- shutil .rmtree (os .path .join (self .options .tmpdir , 'node0' , 'signet' ))
7177 script = script .CScript ([pubkey , script .OP_CHECKSIG ])
7278 blockscript = hexlify (script ).decode ('ascii' )
7379
7480 print ('blockscript' , blockscript )
7581 print ('wif' , wif )
7682
83+ self .parent_chain = self .options .parent_type
7784 # Parent chain args
7885 for n in range (2 ):
7986 # We want to test the rpc cookie method so we force the use of a
@@ -88,32 +95,36 @@ def setup_network(self, split=False):
8895 "-addresstype=legacy" , # To make sure bitcoind gives back p2pkh no matter version
8996 "-deprecatedrpc=validateaddress" ,
9097 "-port=" + str (p2p_port (n )),
91- "-rpcport=" + str (rpc_port (n ))
98+ "-rpcport=" + str (rpc_port (n )),
9299 ])
93100 elif self .options .parent_type == 'signet' :
94- self .parent_chain = 'signet'
95101 rpc_u , rpc_p = rpc_auth_pair (n )
96102 self .extra_args .append ([
97103 "-printtoconsole=0" ,
98104 "-signet_blockscript=%s" % blockscript ,
99105 "-signet_siglen=77" ,
100- "-signet_seednode=178.128.221.177" ,
101106 "-port=" + str (p2p_port (n )),
102107 "-rpcport=" + str (rpc_port (n )),
103108 "-addresstype=legacy" , # To make sure bitcoind gives back p2pkh no matter version
104109 "-deprecatedrpc=validateaddress" ,
105110 "-fallbackfee=0.00001" ,
111+ "-bech32_hrp=sb" ,
112+ "-pchmessagestart=F0C7706A" ,
113+ "-pubkeyprefix=125" ,
114+ "-scriptprefix=87" ,
115+ "-secretprefix=217" ,
116+ "-extpubkeyprefix=043587CF" ,
117+ "-extprvkeyprefix=04358394" ,
106118 ])
107119 elif self .options .parent_type == 'elements' :
108- self .parent_chain = 'parent'
109120 self .extra_args .append ([
110121 "-conf=dummy" ,
111122 "-printtoconsole=0" ,
112123 '-validatepegin=0' ,
113124 '-anyonecanspendaremine' ,
114125 '-initialfreecoins=2100000000000000' ,
115126 "-port=" + str (p2p_port (n )),
116- "-rpcport=" + str (rpc_port (n ))
127+ "-rpcport=" + str (rpc_port (n )),
117128 ])
118129 # Only first parent uses name/password, the 2nd uses cookie auth
119130 if not use_cookie_auth :
0 commit comments