Add verify slot tolerance test (#12344)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terencechain 2023-04-27 08:53:28 -07:00 committed by GitHub
parent 7dffee1c66
commit ce0616b88e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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{