Skip to content

Commit 22df1c7

Browse files
authored
Merge pull request #20 from stakewise/reduce-epochs-span
Reduce epochs span
2 parents 03bc726 + 13704e4 commit 22df1c7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ 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
175+
current_epoch: int = int(
176+
(int(time.time()) - self.genesis_timestamp) / self.seconds_per_epoch
178177
)
179178

180179
if epoch < current_epoch - TOO_FAR_EPOCHS_SPAN:

0 commit comments

Comments
 (0)