Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
raizo07 committed Oct 16, 2024
1 parent 13b88f0 commit dd24771
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/data/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -100,5 +106,6 @@ def main():
args = parser.parse_args()
process_blocks(args)


if __name__ == "__main__":
main()
main()

0 comments on commit dd24771

Please sign in to comment.