File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,23 @@ rpcuser=someuser
4
4
rpcpassword =somepassword
5
5
host =127.0.0.1
6
6
port =8332
7
+ # port=18332
7
8
8
9
# bootstrap.dat hashlist settings (linearize-hashes)
9
10
max_height =313000
10
11
11
12
# bootstrap.dat input/output settings (linearize-data)
13
+
14
+ # mainnet
12
15
netmagic =f9beb4d9
16
+ genesis =000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
13
17
input =/home/example/.bitcoin/blocks
18
+
19
+ # testnet
20
+ # netmagic=0b110907
21
+ # genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
22
+ # input=/home/example/.bitcoin/testnet3/blocks
23
+
14
24
output_file =/home/example/Downloads/bootstrap.dat
15
25
hashlist =hashlist.txt
16
26
split_year =1
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ def run(self):
205
205
206
206
inMagic = inhdr [:4 ]
207
207
if (inMagic != self .settings ['netmagic' ]):
208
- print ("Invalid magic: " + inMagic )
208
+ print ("Invalid magic: " + inMagic . encode ( 'hex' ) )
209
209
return
210
210
inLenLE = inhdr [4 :]
211
211
su = struct .unpack ("<I" , inLenLE )
@@ -265,6 +265,8 @@ def run(self):
265
265
266
266
if 'netmagic' not in settings :
267
267
settings ['netmagic' ] = 'f9beb4d9'
268
+ if 'genesis' not in settings :
269
+ settings ['genesis' ] = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
268
270
if 'input' not in settings :
269
271
settings ['input' ] = 'input'
270
272
if 'hashlist' not in settings :
@@ -291,7 +293,7 @@ def run(self):
291
293
blkindex = get_block_hashes (settings )
292
294
blkmap = mkblockmap (blkindex )
293
295
294
- if not "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" in blkmap :
296
+ if not settings [ 'genesis' ] in blkmap :
295
297
print ("Genesis block not found in hashlist" )
296
298
else :
297
299
BlockDataCopier (settings , blkindex , blkmap ).run ()
You can’t perform that action at this time.
0 commit comments