Run Gofmt on Repo (#5541)

* toggle flags
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* run gofmt
* Merge branch 'master' into lint-repo
This commit is contained in:
Raul Jordan
2020-04-20 11:35:04 -05:00
committed by GitHub
parent fae307e5a2
commit 37cba662f1
8 changed files with 21 additions and 21 deletions

View File

@@ -17,7 +17,7 @@ func TestHeadSlot_DataRace(t *testing.T) {
beaconDB: db,
}
go func() {
if err := s.saveHead(context.Background(), [32]byte{}, ); err != nil {
if err := s.saveHead(context.Background(), [32]byte{}); err != nil {
t.Fatal(err)
}
}()
@@ -33,7 +33,7 @@ func TestHeadRoot_DataRace(t *testing.T) {
stateGen: stategen.New(db, cache.NewStateSummaryCache()),
}
go func() {
if err := s.saveHead(context.Background(), [32]byte{}, ); err != nil {
if err := s.saveHead(context.Background(), [32]byte{}); err != nil {
t.Fatal(err)
}
}()
@@ -51,7 +51,7 @@ func TestHeadBlock_DataRace(t *testing.T) {
stateGen: stategen.New(db, cache.NewStateSummaryCache()),
}
go func() {
if err := s.saveHead(context.Background(), [32]byte{}, ); err != nil {
if err := s.saveHead(context.Background(), [32]byte{}); err != nil {
t.Fatal(err)
}
}()
@@ -68,7 +68,7 @@ func TestHeadState_DataRace(t *testing.T) {
stateGen: stategen.New(db, cache.NewStateSummaryCache()),
}
go func() {
if err := s.saveHead(context.Background(), [32]byte{}, ); err != nil {
if err := s.saveHead(context.Background(), [32]byte{}); err != nil {
t.Fatal(err)
}
}()

View File

@@ -21,11 +21,11 @@ func TestChainService_SaveHead_DataRace(t *testing.T) {
beaconDB: db,
}
go func() {
if err := s.saveHead(context.Background(), [32]byte{}, ); err != nil {
if err := s.saveHead(context.Background(), [32]byte{}); err != nil {
t.Fatal(err)
}
}()
if err := s.saveHead(context.Background(), [32]byte{}, ); err != nil {
if err := s.saveHead(context.Background(), [32]byte{}); err != nil {
t.Fatal(err)
}
}

View File

@@ -5,12 +5,12 @@ import (
"testing"
"github.com/gogo/protobuf/proto"
"github.com/prysmaticlabs/prysm/shared/params"
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
stateTrie "github.com/prysmaticlabs/prysm/beacon-chain/state"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/hashutil"
"github.com/prysmaticlabs/prysm/shared/params"
)
func TestCheckpointStateCacheKeyFn_OK(t *testing.T) {

View File

@@ -56,7 +56,7 @@ func (c *committeeIDs) GetAttesterCommitteeIDs(slot uint64) []uint64 {
return nil
}
if v, ok := val.([]uint64); ok {
return v
return v
}
return nil
}

View File

@@ -370,8 +370,8 @@ func TestStateReferenceCopy_NoUnexpectedAttestationsMutation(t *testing.T) {
// Update initial state.
atts := []*p2ppb.PendingAttestation{
{AggregationBits: bitfield.NewBitlist(1),},
{AggregationBits: bitfield.NewBitlist(2),},
{AggregationBits: bitfield.NewBitlist(1)},
{AggregationBits: bitfield.NewBitlist(2)},
}
if err := a.SetPreviousEpochAttestations(atts[:1]); err != nil {
t.Fatal(err)

View File

@@ -244,10 +244,10 @@ func TestReverse(t *testing.T) {
input [][32]byte
output [][32]byte
}{
{[][32]byte{[32]byte{'A'}, [32]byte{'B'}, [32]byte{'C'}, [32]byte{'D'}, [32]byte{'E'}, [32]byte{'F'}, [32]byte{'G'}, [32]byte{'H'}},
[][32]byte{[32]byte{'H'}, [32]byte{'G'}, [32]byte{'F'}, [32]byte{'E'}, [32]byte{'D'}, [32]byte{'C'}, [32]byte{'B'}, [32]byte{'A'}}},
{[][32]byte{[32]byte{1}, [32]byte{2}, [32]byte{3}, [32]byte{4}},
[][32]byte{[32]byte{4}, [32]byte{3}, [32]byte{2}, [32]byte{1}}},
{[][32]byte{{'A'}, {'B'}, {'C'}, {'D'}, {'E'}, {'F'}, {'G'}, {'H'}},
[][32]byte{{'H'}, {'G'}, {'F'}, {'E'}, {'D'}, {'C'}, {'B'}, {'A'}}},
{[][32]byte{{1}, {2}, {3}, {4}},
[][32]byte{{4}, {3}, {2}, {1}}},
{[][32]byte{}, [][32]byte{}},
}
for _, tt := range tests {

View File

@@ -35,7 +35,7 @@ func DepositInput(depositKey *Key, withdrawalKey *Key, amountInGwei uint64) (*et
return nil, [32]byte{}, err
}
domain, err := helpers.ComputeDomain(params.BeaconConfig().DomainDeposit, nil /*forkVersion*/, nil/*genesisValidatorsRoot*/)
domain, err := helpers.ComputeDomain(params.BeaconConfig().DomainDeposit, nil /*forkVersion*/, nil /*genesisValidatorsRoot*/)
if err != nil {
return nil, [32]byte{}, err
}

View File

@@ -35,12 +35,12 @@ type testCase struct {
func TestWalkThroughEmbeddedInterfaces(t *testing.T) {
cases := []testCase{
testCase{"Inner{}.Method", false, nil},
testCase{"(&Inner{}).Method", false, nil},
testCase{"Outer{}.Method", false, nil},
testCase{"InnerInterface.Method", true, []string{"test.InnerInterface"}},
testCase{"OuterInterface.Method", true, []string{"test.OuterInterface", "test.InnerInterface"}},
testCase{"OuterInterfaceStruct.Method", true, []string{"test.OuterInterface", "test.InnerInterface"}},
{"Inner{}.Method", false, nil},
{"(&Inner{}).Method", false, nil},
{"Outer{}.Method", false, nil},
{"InnerInterface.Method", true, []string{"test.InnerInterface"}},
{"OuterInterface.Method", true, []string{"test.OuterInterface", "test.InnerInterface"}},
{"OuterInterfaceStruct.Method", true, []string{"test.OuterInterface", "test.InnerInterface"}},
}
for _, c := range cases {