Skip to content

Commit

Permalink
fixing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
james-prysm committed Jan 11, 2022
1 parent c52f411 commit 0e96c61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/prysmaticlabs/go-bitfield"
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
"github.com/prysmaticlabs/prysm/testing/util"

Expand Down Expand Up @@ -254,7 +255,7 @@ func TestMapBeaconBlockAltair(t *testing.T) {
},
SyncAggregate: &ethpb.SyncAggregate{
SyncCommitteeSignature: make([]byte, fieldparams.BLSSignatureLength),
SyncCommitteeBits: make([]byte, 64),
SyncCommitteeBits: bitfield.NewBitvector512(),
},
},
},
Expand Down Expand Up @@ -398,7 +399,7 @@ func TestMapContributionAndProof(t *testing.T) {
Slot: 0,
BlockRoot: make([]byte, fieldparams.RootLength),
SubcommitteeIndex: 0,
AggregationBits: make([]byte, 64),
AggregationBits: bitfield.NewBitvector128(),
Signature: make([]byte, fieldparams.BLSSignatureLength),
},
SelectionProof: make([]byte, fieldparams.BLSSignatureLength),
Expand Down
6 changes: 3 additions & 3 deletions validator/keymanager/remote-web3signer/v1/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func MockForkInfo() *ForkInfo {
// MockAttestation is a mock implementation of the Attestation.
func MockAttestation() *Attestation {
return &Attestation{
AggregationBits: hexutil.Encode(bitfield.Bitlist{0b1101}),
AggregationBits: hexutil.Encode(bitfield.Bitlist{0b1101}.Bytes()),
Data: &AttestationData{
Slot: "0",
Index: "0",
Expand Down Expand Up @@ -129,7 +129,7 @@ func MockBeaconBlockAltair() *BeaconBlockAltair {
},
SyncAggregate: &SyncAggregate{
SyncCommitteeSignature: hexutil.Encode(make([]byte, fieldparams.BLSSignatureLength)),
SyncCommitteeBits: hexutil.Encode(make([]byte, 64)),
SyncCommitteeBits: hexutil.Encode(bitfield.NewBitvector512().Bytes()),
},
},
}
Expand Down Expand Up @@ -207,7 +207,7 @@ func MockContributionAndProof() *ContributionAndProof {
Slot: "0",
BeaconBlockRoot: hexutil.Encode(make([]byte, fieldparams.RootLength)),
SubcommitteeIndex: "0",
AggregationBits: hexutil.Encode(make([]byte, 64)),
AggregationBits: hexutil.Encode(bitfield.NewBitvector128().Bytes()),
Signature: hexutil.Encode(make([]byte, fieldparams.BLSSignatureLength)),
},
SelectionProof: hexutil.Encode(make([]byte, fieldparams.BLSSignatureLength)),
Expand Down

0 comments on commit 0e96c61

Please sign in to comment.