Skip to content

Commit c6fa57d

Browse files
committed
Reduce epochs span
1 parent 03bc726 commit c6fa57d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
SYNC_BLOCKS_DELAY: int = int(environ.get("SYNC_BLOCKS_DELAY", "277"))
8888

8989
# number of ETH2 epochs that won't be possible to fetch from the node starting from the current epoch
90-
TOO_FAR_EPOCHS_SPAN: int = int(environ.get("TOO_FAR_EPOCHS_NUMBER", "15"))
90+
TOO_FAR_EPOCHS_SPAN: int = int(environ.get("TOO_FAR_EPOCHS_NUMBER", "8"))
9191

9292
# maximum gas spent on oracle vote
9393
ORACLE_VOTE_GAS_LIMIT: Wei = Wei(int(environ.get("ORACLE_VOTE_GAS_LIMIT", "250000")))

src/staking_rewards/rewards.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ def process(self) -> None:
172172
f"Voting for new total rewards with parameters:"
173173
f" block number={next_sync_block_number}, epoch={epoch}"
174174
)
175-
current_epoch: int = (
176-
int((int(time.time()) - self.genesis_timestamp) / self.seconds_per_epoch)
177-
- ETH2_CONFIRMATION_EPOCHS
178-
)
175+
current_epoch: int = (int((int(time.time()) - self.genesis_timestamp) / self.seconds_per_epoch))
179176

180177
if epoch < current_epoch - TOO_FAR_EPOCHS_SPAN:
181178
# Wait for next update round as the required epoch is too far behind

0 commit comments

Comments
 (0)