Skip to content

Commit

Permalink
run make format (cosmos#8642)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
Alessio Treglia and mergify[bot] authored Feb 19, 2021
1 parent c6355fd commit 9b7a12f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion simapp/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestRunMigrations(t *testing.T) {
var err error

// Since it's very hard to test actual in-place store migrations in
// tests (due to the difficulty of maintaing multiple versions of a
// tests (due to the difficulty of maintaining multiple versions of a
// module), we're just testing here that the migration logic is
// called.
called := 0
Expand Down
84 changes: 42 additions & 42 deletions types/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,51 +30,51 @@ func BenchmarkParseCoin(b *testing.B) {
}

func BenchmarkUintMarshal(b *testing.B) {
var values = []uint64{
0,
1,
1 << 10,
1<<10 - 3,
1<<63 - 1,
1<<32 - 7,
1<<22 - 8,
}
var values = []uint64{
0,
1,
1 << 10,
1<<10 - 3,
1<<63 - 1,
1<<32 - 7,
1<<22 - 8,
}

var scratch [20]byte
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for _, value := range values {
u := types.NewUint(value)
n, err := u.MarshalTo(scratch[:])
if err != nil {
b.Fatal(err)
}
b.SetBytes(int64(n))
}
}
var scratch [20]byte
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for _, value := range values {
u := types.NewUint(value)
n, err := u.MarshalTo(scratch[:])
if err != nil {
b.Fatal(err)
}
b.SetBytes(int64(n))
}
}
}

func BenchmarkIntMarshal(b *testing.B) {
var values = []int64{
0,
1,
1 << 10,
1<<10 - 3,
1<<63 - 1,
1<<32 - 7,
1<<22 - 8,
}
var values = []int64{
0,
1,
1 << 10,
1<<10 - 3,
1<<63 - 1,
1<<32 - 7,
1<<22 - 8,
}

var scratch [20]byte
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for _, value := range values {
in := types.NewInt(value)
n, err := in.MarshalTo(scratch[:])
if err != nil {
b.Fatal(err)
}
b.SetBytes(int64(n))
}
}
var scratch [20]byte
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for _, value := range values {
in := types.NewInt(value)
n, err := in.MarshalTo(scratch[:])
if err != nil {
b.Fatal(err)
}
b.SetBytes(int64(n))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() {
suite.coordinator.CommitBlock(suite.chainA, suite.chainB)
}

// get updated substitue
// get updated substitute
substituteClientState = suite.chainA.GetClientState(substitute).(*types.ClientState)

subjectClientStore := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), subject)
Expand Down

0 comments on commit 9b7a12f

Please sign in to comment.