Skip to content

Commit

Permalink
Restore 'check.software version()' but only every 24 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Mar 16, 2024
1 parent ddd2143 commit fa1eba1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions counterparty-lib/counterpartylib/lib/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,6 @@ def follow(db):

# Get new blocks.
if block_index <= block_count:
#mempool_spinner.stop()
#block_spinner = Halo(text=f"Parsing block {block_index}...", spinner=SPINNER_STYLE)
#block_spinner.start()

# Backwards check for incorrect blocks due to chain reorganisation, and stop when a common parent is found.
current_index = block_index
Expand Down Expand Up @@ -783,9 +780,11 @@ def follow(db):
tx_index = get_next_tx_index(db)
continue

# Check version. (Don’t add any blocks to the database while
# Check version every 144 blocks (around 24H).

Check warning

Code scanning / pylint

Trailing whitespace. Warning

Trailing whitespace.
# (Don’t add more blocks to the database while
# running an out‐of‐date client!)
# TODO: check.software_version() # This is too much!
if block_index % 144 == 0:
check.software_version()

# Get and parse transactions in this block (atomically).
# logger.debug(f'Blockchain cache size: {len(prefetcher.BLOCKCHAIN_CACHE)}')
Expand Down

0 comments on commit fa1eba1

Please sign in to comment.