mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
c4c9a8465a
* use faster hash proto * Merge branch 'master' into faster-att-pool * gaz * Merge branch 'faster-att-pool' of github.com:prysmaticlabs/prysm into faster-att-pool * nil checks and failing tests * Merge refs/heads/master into faster-att-pool * Merge refs/heads/master into faster-att-pool * Merge refs/heads/master into faster-att-pool * Merge refs/heads/master into faster-att-pool * Merge refs/heads/master into faster-att-pool * Fix * Merge branch 'faster-att-pool' of github.com:prysmaticlabs/prysm into faster-att-pool * Fix tests
27 lines
777 B
Go
27 lines
777 B
Go
package sync
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
"testing"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
"github.com/prysmaticlabs/go-bitfield"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations"
|
|
)
|
|
|
|
func TestBeaconAggregateProofSubscriber_CanSave(t *testing.T) {
|
|
r := &Service{
|
|
attPool: attestations.NewPool(),
|
|
}
|
|
|
|
a := ðpb.AggregateAttestationAndProof{Aggregate: ðpb.Attestation{AggregationBits: bitfield.Bitlist{0x07}, Data: ðpb.AttestationData{Slot: 4}}, AggregatorIndex: 100}
|
|
if err := r.beaconAggregateProofSubscriber(context.Background(), a); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if !reflect.DeepEqual(r.attPool.AggregatedAttestations(), []*ethpb.Attestation{a.Aggregate}) {
|
|
t.Error("Did not save aggregated attestation")
|
|
}
|
|
}
|