@@ -64,14 +64,13 @@ def setup_network(self, split=False):
64
64
# addr = temp_node.getnewaddress()
65
65
# k = key.CECKey()
66
66
# pub = temp_node.validateaddress(addr)["pubkey"]
67
- # print('pub', pub)
68
67
# k.set_pubkey(hex_str_to_bytes(pub))
69
68
# pubkey = key.CPubKey(k.get_pubkey())
70
69
# wif = temp_node.dumpprivkey(addr)
71
70
# stop_node(temp_node, 0)
72
- # datadir = os.path.join(self.options.tmpdir, 'node0', 'signet')
73
- # print('datadir', datadir )
74
- # shutil.rmtree(datadir )
71
+ # shutil.rmtree( os.path.join(self.options.tmpdir, 'node0', 'signet') )
72
+ # script = script.CScript([pubkey, script.OP_CHECKSIG] )
73
+ # blockscript = hexlify(script).decode('ascii' )
75
74
76
75
import hashlib , random , codecs
77
76
from test_framework import script , key , address
@@ -83,27 +82,12 @@ def setup_network(self, split=False):
83
82
pubkey = key .CPubKey (k .get_pubkey ())
84
83
script = script .CScript ([pubkey , script .OP_CHECKSIG ])
85
84
blockscript = hexlify (script ).decode ('ascii' )
86
- print ('blockscript' , blockscript )
87
- print ('wif' , wif )
88
- # raise Exception('aaa')
85
+
89
86
# blockscript = '4104db082f6133b7d9cdb7be60d8384c818ae61233c20485b438e8c1d7772b7f2dbdc04f2f7273d534df0e6a54c8b333994f6275bb921df2438e9a672438e4ed4969ac'
90
87
# wif = '8Hh8jNjkx1aSCgEk3iq9Vo2APZUSDQJVt3rJ2BRpb5Tavqb68vW'
91
88
92
- # import hashlib, random, codecs
93
- # from test_framework import script, key, address
94
- # k = key.CECKey()
95
- # pk_bytes = hashlib.sha256(str(random.getrandbits(256)).encode('utf-8')).digest()
96
- # k.set_secretbytes(pk_bytes)
97
- # w = address.byte_to_base58(pk_bytes, 217)
98
- # print("generated key {}: \n pub: {}\n wif: {}".format(n+1,
99
- # codecs.encode(k.get_pubkey(), 'hex_codec').decode("utf-8"),
100
- # w))
101
- # pubkey = key.CPubKey(k.get_pubkey())
102
- # script = script.CScript([pubkey, script.OP_CHECKSIG])
103
- # from binascii import hexlify
104
- # print('script', hexlify(script).decode('ascii'))
105
- # self.nodes[n].importprivkey(w)
106
-
89
+ # print('blockscript', blockscript)
90
+ # print('wif', wif)
107
91
108
92
# Parent chain args
109
93
for n in range (2 ):
@@ -190,7 +174,7 @@ def setup_network(self, split=False):
190
174
'-con_parent_signet_siglen=77' ,
191
175
'-parentpubkeyprefix=125' ,
192
176
'-parentscriptprefix=87' ,
193
- '-con_parent_chain_signblockscript=4104db082f6133b7d9cdb7be60d8384c818ae61233c20485b438e8c1d7772b7f2dbdc04f2f7273d534df0e6a54c8b333994f6275bb921df2438e9a672438e4ed4969ac' ,
177
+ '-con_parent_chain_signblockscript=%s' % blockscript ,
194
178
])
195
179
196
180
if used_cookie_auth :
0 commit comments