@@ -57,23 +57,30 @@ def setup_network(self, split=False):
57
57
"-port=" + str (p2p_port (0 )),
58
58
"-rpcport=" + str (rpc_port (0 )),
59
59
"-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" ,
61
68
]
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 )
63
70
addr = temp_node .getnewaddress ()
64
71
k = key .CECKey ()
65
72
pub = temp_node .validateaddress (addr )["pubkey" ]
66
73
k .set_pubkey (hex_str_to_bytes (pub ))
67
74
pubkey = key .CPubKey (k .get_pubkey ())
68
75
wif = temp_node .dumpprivkey (addr )
69
76
stop_node (temp_node , 0 )
70
- shutil .rmtree (os .path .join (self .options .tmpdir , 'node0' , 'signet' ))
71
77
script = script .CScript ([pubkey , script .OP_CHECKSIG ])
72
78
blockscript = hexlify (script ).decode ('ascii' )
73
79
74
80
print ('blockscript' , blockscript )
75
81
print ('wif' , wif )
76
82
83
+ self .parent_chain = self .options .parent_type
77
84
# Parent chain args
78
85
for n in range (2 ):
79
86
# We want to test the rpc cookie method so we force the use of a
@@ -88,32 +95,38 @@ def setup_network(self, split=False):
88
95
"-addresstype=legacy" , # To make sure bitcoind gives back p2pkh no matter version
89
96
"-deprecatedrpc=validateaddress" ,
90
97
"-port=" + str (p2p_port (n )),
91
- "-rpcport=" + str (rpc_port (n ))
98
+ "-rpcport=" + str (rpc_port (n )),
92
99
])
100
+
93
101
elif self .options .parent_type == 'signet' :
94
- self .parent_chain = 'signet'
95
102
rpc_u , rpc_p = rpc_auth_pair (n )
96
103
self .extra_args .append ([
97
104
"-printtoconsole=0" ,
98
105
"-signet_blockscript=%s" % blockscript ,
99
106
"-signet_siglen=77" ,
100
- "-signet_seednode=178.128.221.177" ,
101
107
"-port=" + str (p2p_port (n )),
102
108
"-rpcport=" + str (rpc_port (n )),
103
109
"-addresstype=legacy" , # To make sure bitcoind gives back p2pkh no matter version
104
110
"-deprecatedrpc=validateaddress" ,
105
111
"-fallbackfee=0.00001" ,
112
+ "-bech32_hrp=sb" ,
113
+ "-pchmessagestart=F0C7706A" ,
114
+ "-pubkeyprefix=125" ,
115
+ "-scriptprefix=87" ,
116
+ "-secretprefix=217" ,
117
+ "-extpubkeyprefix=043587CF" ,
118
+ "-extprvkeyprefix=04358394" ,
106
119
])
120
+
107
121
elif self .options .parent_type == 'elements' :
108
- self .parent_chain = 'parent'
109
122
self .extra_args .append ([
110
123
"-conf=dummy" ,
111
124
"-printtoconsole=0" ,
112
125
'-validatepegin=0' ,
113
126
'-anyonecanspendaremine' ,
114
127
'-initialfreecoins=2100000000000000' ,
115
128
"-port=" + str (p2p_port (n )),
116
- "-rpcport=" + str (rpc_port (n ))
129
+ "-rpcport=" + str (rpc_port (n )),
117
130
])
118
131
# Only first parent uses name/password, the 2nd uses cookie auth
119
132
if not use_cookie_auth :
@@ -147,13 +160,15 @@ def setup_network(self, split=False):
147
160
'-mainchainrpcport=%s' % rpc_port (n ),
148
161
'-recheckpeginblockinterval=15' , # Long enough to allow failure and repair before timeout
149
162
]
163
+
150
164
if self .options .parent_type == 'elements' :
151
165
args .extend ([
152
166
'-parentpubkeyprefix=235' ,
153
167
'-parentscriptprefix=75' ,
154
168
'-con_parent_chain_signblockscript=%s' % parent_chain_signblockscript ,
155
169
'-con_parent_pegged_asset=%s' % parent_pegged_asset ,
156
170
])
171
+
157
172
elif self .options .parent_type == 'signet' :
158
173
args .extend ([
159
174
'-con_parent_is_signet=1' ,
0 commit comments