Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
stedfn committed Oct 10, 2024
1 parent 769ab99 commit 569df99
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions debug_scripts/estimate_epoch_start_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ def find_epoch_for_timestamp(future_epochs, voting_datetime):
def find_protocol_upgrade_time(voting_date, future_epochs, target_timezone):
# Parse the voting date
try:
voting_datetime = datetime.strptime(voting_date,
'%Y-%m-%d %H:%M:%S')
voting_datetime = datetime.strptime(voting_date, '%Y-%m-%d %H:%M:%S')
voting_datetime = target_timezone.localize(voting_datetime)
except ValueError:
print(
Expand All @@ -147,8 +146,7 @@ def find_protocol_upgrade_time(voting_date, future_epochs, target_timezone):
"Not enough future epochs predicted to determine the protocol upgrade time."
)
return
protocol_upgrade_datetime = future_epochs[protocol_upgrade_epoch_number
- 1]
protocol_upgrade_datetime = future_epochs[protocol_upgrade_epoch_number - 1]
protocol_upgrade_formatted = protocol_upgrade_datetime.strftime(
'%Y-%m-%d %H:%M:%S %Z%z %A')
print(f"\nVoting date falls into epoch {epoch_T}.")
Expand Down Expand Up @@ -182,7 +180,8 @@ def main(args):
args.num_future_epochs, target_timezone)

if args.voting_date:
find_protocol_upgrade_time(args.voting_date, future_epochs, target_timezone)
find_protocol_upgrade_time(args.voting_date, future_epochs,
target_timezone)


# Custom action to set the URL based on chain_id
Expand Down

0 comments on commit 569df99

Please sign in to comment.