Skip to content

Commit

Permalink
Run Gofmt on Repo (#5541)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rauljordan committed Apr 20, 2020
1 parent fae307e commit 37cba66
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions beacon-chain/blockchain/chain_info_norace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}()
Expand All @@ -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)
}
}()
Expand All @@ -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)
}
}()
Expand All @@ -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)
}
}()
Expand Down
4 changes: 2 additions & 2 deletions beacon-chain/blockchain/service_norace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
2 changes: 1 addition & 1 deletion beacon-chain/cache/checkpoint_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/cache/committee_ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions beacon-chain/state/references_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions shared/bytesutil/bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion shared/keystore/deposit_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
12 changes: 6 additions & 6 deletions tools/analyzers/errcheck/embedded_walker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 37cba66

Please sign in to comment.