diff --git a/scripts/data/client.py b/scripts/data/client.py index b81e3885..e83c3e8e 100644 --- a/scripts/data/client.py +++ b/scripts/data/client.py @@ -10,6 +10,7 @@ BASE_DIR = Path(".client_cache") DEFAULT_NO_OF_BLOCKS = 1 + def run_client(initial_height, num_blocks, mode): first = initial_height + 1 second = initial_height + num_blocks @@ -62,6 +63,7 @@ def run_client(initial_height, num_blocks, mode): print(result.stdout) return True + def process_blocks(args): BASE_DIR.mkdir(exist_ok=True) end = args.start + args.blocks @@ -78,11 +80,15 @@ def process_blocks(args): print("Unsupported strategy") return + def main(): parser = argparse.ArgumentParser(description="Run client script") parser.add_argument("--start", type=int, default=1, help="Start block height") parser.add_argument( - "--blocks", type=int, default=DEFAULT_NO_OF_BLOCKS, help="Number of blocks to process" + "--blocks", + type=int, + default=DEFAULT_NO_OF_BLOCKS, + help="Number of blocks to process", ) parser.add_argument( "--step", type=int, default=1, help="Step size for block processing" @@ -100,5 +106,6 @@ def main(): args = parser.parse_args() process_blocks(args) + if __name__ == "__main__": - main() \ No newline at end of file + main()