Skip to content

Commit

Permalink
Add verify slot tolerance test (#12344)
Browse files Browse the repository at this point in the history
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
terencechain and prylabs-bulldozer[bot] authored Apr 27, 2023
1 parent 7dffee1 commit ce0616b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions time/slots/slottime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ func TestVerifySlotTime(t *testing.T) {
},
wantedErr: "could not process slot from the future",
},
{
name: "future slot but ok given 2s tolerance",
args: args{
genesisTime: prysmTime.Now().Add(-1*time.Duration(params.BeaconConfig().SecondsPerSlot) - 10*time.Second).Unix(),
slot: 1,
timeTolerance: 2 * time.Second,
},
},
{
name: "max future slot",
args: args{
Expand Down

0 comments on commit ce0616b

Please sign in to comment.