Skip to content

Commit 9ffb699

Browse files
committed
change: always fetch full blocks if possible
Since we want to have the full blocks, and I always pass the arg for it, just always fetch and store the full blocks.
1 parent 7894b08 commit 9ffb699

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

get-data.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def main(args):
9595
print(f"Adding {height} {blockhash}")
9696

9797
blockfile = f"{args.blocks_dir}/{height}-{blockhash}.bin"
98-
if args.get_full_blocks and height >= pruneheight and tip["status"] in ["valid-headers","valid-fork"] and not os.path.exists(blockfile):
98+
if height >= pruneheight and tip["status"] in ["valid-headers","valid-fork"] and not os.path.exists(blockfile):
9999
try:
100100
blockhex = cli("getblock", blockhash, "0")
101101
blockdata = open(blockfile, "wb")
@@ -125,7 +125,6 @@ def get_args(argv):
125125
parser.add_argument("--rpc-host", default="", type=str)
126126
parser.add_argument("--rpc-pass", default="", type=str)
127127
parser.add_argument("--rpc-port", default="", type=str)
128-
parser.add_argument("--get-full-blocks", default=False, action="store_true")
129128
parser.add_argument("--blocks-dir", default="blocks", type=str)
130129
parser.add_argument("--header-csv", default="stale-blocks.csv", type=str)
131130

0 commit comments

Comments
 (0)