mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
2d10bcf179
* move state protos * regen ssz * edit v1 code * fix imports * building * beacon chain builds * validator and shared builds * fuzz builds * changes * spectest builds * tools build * remove import cycle * generate ssz * pcli * gaz * kafka * gaz
25 lines
767 B
Go
25 lines
767 B
Go
package v1
|
|
|
|
import (
|
|
"testing"
|
|
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
statepb "github.com/prysmaticlabs/prysm/proto/prysm/v2/state"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
|
)
|
|
|
|
func Test_handlePendingAttestation_OutOfRange(t *testing.T) {
|
|
items := make([]*statepb.PendingAttestation, 1)
|
|
indices := []uint64{3}
|
|
_, err := handlePendingAttestation(items, indices, false)
|
|
assert.ErrorContains(t, "index 3 greater than number of pending attestations 1", err)
|
|
}
|
|
|
|
func Test_handleEth1DataSlice_OutOfRange(t *testing.T) {
|
|
items := make([]*ethpb.Eth1Data, 1)
|
|
indices := []uint64{3}
|
|
_, err := HandleEth1DataSlice(items, indices, false)
|
|
assert.ErrorContains(t, "index 3 greater than number of items in eth1 data slice 1", err)
|
|
|
|
}
|