Skip to content

Commit

Permalink
Update test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdee committed Aug 24, 2024
1 parent 5608aaa commit d9f7691
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions http/attestationpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ import (
"github.com/stretchr/testify/require"
)

func slotptr(slot uint64) *phase0.Slot {
res := phase0.Slot(slot)
return &res
}

func TestAttestationPool(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
Expand Down Expand Up @@ -57,14 +62,14 @@ func TestAttestationPool(t *testing.T) {
{
name: "Empty",
opts: &api.AttestationPoolOpts{
Slot: 1,
Slot: slotptr(1),
},
expected: make([]*phase0.Attestation, 0),
},
{
name: "Current",
opts: &api.AttestationPoolOpts{
Slot: phase0.Slot(uint64(time.Since(genesisResponse.Data.GenesisTime).Seconds()) / uint64(slotDuration.Seconds())),
Slot: slotptr(uint64(time.Since(genesisResponse.Data.GenesisTime).Seconds()) / uint64(slotDuration.Seconds())),
},
},
}
Expand Down

0 comments on commit d9f7691

Please sign in to comment.