Skip to content

Commit

Permalink
Fix bug, import entire state
Browse files Browse the repository at this point in the history
  • Loading branch information
lithp committed Dec 6, 2019
1 parent 89684f9 commit 3753284
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/gethimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,8 @@ def sweep_state(gethdb: GethDatabase, trinitydb: LevelDB):
trinitydb[key] = value
imported_entries += 1

if key >= bucket:
if key >= bucket and bucket != b'\xff\xff':
logger.debug(f'imported: {bucket.hex()} skipped={skipped_keys}')
if bucket == b'\xff' * 2:
break
bucket = (int.from_bytes(bucket, 'big') + 1).to_bytes(2, 'big')

logger.info(f'sweep_state: successfully imported {imported_entries} state entries')
Expand Down

0 comments on commit 3753284

Please sign in to comment.