Don't use the wrong SECONDS_PER_ETH1_BLOCK constant

This commit is contained in:
Zahary Karadjov 2023-03-09 19:27:14 +02:00
parent f5a3ea6cbb
commit 280223d976
No known key found for this signature in database
GPG Key ID: C1F42EAFF38D570F
1 changed files with 2 additions and 2 deletions

View File

@ -393,8 +393,8 @@ func voting_period_start_time(state: ForkedHashedBeaconState): uint64 =
func is_candidate_block(cfg: RuntimeConfig,
blk: Eth1Block,
period_start: uint64): bool =
(blk.timestamp + cfg.SECONDS_PER_ETH1_BLOCK * cfg.ETH1_FOLLOW_DISTANCE <= period_start) and
(blk.timestamp + cfg.SECONDS_PER_ETH1_BLOCK * cfg.ETH1_FOLLOW_DISTANCE * 2 >= period_start)
(blk.timestamp + SECONDS_PER_SLOT * cfg.ETH1_FOLLOW_DISTANCE <= period_start) and
(blk.timestamp + SECONDS_PER_SLOT * cfg.ETH1_FOLLOW_DISTANCE * 2 >= period_start)
func asEth2Digest*(x: BlockHash): Eth2Digest =
Eth2Digest(data: array[32, byte](x))