Skip to content

Commit

Permalink
Get only last 64 blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilchodola committed May 14, 2024
1 parent b05ad2d commit b0d0ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions flood/generators/object_generators/input_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from functools import partial

BLOCK_RANGE = 50
HEADERS = {'Content-Type': 'application/json', 'User-Agent': 'flood'}
post = partial(requests.post, headers=HEADERS)

Expand Down Expand Up @@ -33,7 +32,7 @@ def get_block_range_and_tx(nodes):
latest = get_latest_block(node_urls[0])

start_block = latest - 64
end_block = start_block + BLOCK_RANGE
end_block = latest

response = get_block_and_ensure_it_exists(node_urls, start_block)
get_block_and_ensure_it_exists(node_urls, end_block)
Expand Down
3 changes: 1 addition & 2 deletions flood/tests/equality_tests/input_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from functools import partial

BLOCK_RANGE = 50
HEADERS = {'Content-Type': 'application/json', 'User-Agent': 'flood'}
post = partial(requests.post, headers=HEADERS)

Expand Down Expand Up @@ -33,7 +32,7 @@ def get_block_range_and_tx(nodes):
latest = get_latest_block(node_urls[0])

start_block = latest - 64
end_block = start_block + BLOCK_RANGE
end_block = latest

response = get_block_and_ensure_it_exists(node_urls, start_block)
get_block_and_ensure_it_exists(node_urls, end_block)
Expand Down

0 comments on commit b0d0ec5

Please sign in to comment.