File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 11{
22 "rpc" : {
3- "host" : " " ,
4- "port" : 0 ,
5- "user" : " " ,
6- "password" : " "
3+ "host" : " http://192.168.1.59 " ,
4+ "port" : 8332 ,
5+ "user" : " bitcoin " ,
6+ "password" : " ilovebitcoin "
77 },
88 "blocks" : {
9- "count" : 900001
9+ "count" : 918000
1010 },
1111 "from_checkpoint" : false
1212}
Original file line number Diff line number Diff line change @@ -110,12 +110,21 @@ def main():
110110 blocks = loaded .blocks
111111 else :
112112 puller = BlockHeaderPuller (config ["rpc" ])
113+ end = False
113114 for i in range (loaded .amount , config ["blocks" ]["count" ], 2000 ):
114115 hex_headers = puller .pull_block_headers (
115116 i , min (2000 , config ["blocks" ]["count" ] - i ))
117+
118+ if any (h is None for h in hex_headers ):
119+ end = True
120+
121+ hex_headers = [h for h in hex_headers if h is not None ]
122+
116123 blocks = [Block (header ) for header in hex_headers ]
117124 loaded .add_blocks (blocks )
118-
125+ if end :
126+ break
127+
119128 blocks = loaded .blocks
120129
121130 if not checkpoint :
Original file line number Diff line number Diff line change 77mkdir -p ./target/blocks_bin
88mkdir -p ./target/blocks_bin/recursive
99
10- if ! pip show electrum_client > /dev/null 2>&1 ; then
11- echo -e " Pakage 'electrum_client' is not installed yet.\nRun:\n\tpip3 install electrum_client==0.0.1"
12- exit 1
13- fi
14-
1510# Generate Prover.toml
1611python3 -m generators.blocks.main " $@ "
You can’t perform that action at this time.
0 commit comments