Skip to content

Commit 582e66b

Browse files
committed
doc: Added regtest config for linearize script
Updated the example-linearize.cfg file to include support for the regtest chain network config which is used by the ./linearize-data.py Problem: Without the regtest magic, genesis hash and path config, the `linearize-data.py` script cannot generate a bootstrap.dat file. Example of error: ./linearize-data.py ./linearize.cfg Read 102 hashes Genesis block not found in hashlist Solution: Added netmagic, genesis and input example parameters to file. Resolution 1. Starting bitcoind in regtest mode 2. bitcoin-cli generatetoaddress 101 $(bitcoin-cli getnewaddress) 3. ./linearize-hashes.py ./linearize.cfg > ./hashlist.txt 4. ./linearize-data.py ./linearize.cfg Example after fix: $ ./linearize-data.py ./linearize.cfg Read 102 hashes Input file /Users/gr0kchain/.bitcoin/regtest/blocks/blk00000.dat Output file /Users/gr0kchain/Downloads/bootstrap.dat Done (102 blocks written)
1 parent 224c196 commit 582e66b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/linearize/example-linearize.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ input=/home/example/.bitcoin/blocks
2828
#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
2929
#input=/home/example/.bitcoin/testnet3/blocks
3030

31+
# regtest
32+
#netmagic=fabfb5da
33+
#genesis=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
34+
#input=/home/example/.bitcoin/regtest/blocks
35+
3136
# "output" option causes blockchain files to be written to the given location,
3237
# with "output_file" ignored. If not used, "output_file" is used instead.
3338
# output=/home/example/blockchain_directory

0 commit comments

Comments
 (0)