Skip to content

Commit

Permalink
Chore: Sorting imported library
Browse files Browse the repository at this point in the history
  • Loading branch information
c98tristan committed Jul 25, 2023
1 parent 530cbb1 commit 260f47e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
3 changes: 1 addition & 2 deletions core/database_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ import (
"fmt"
"math/big"

"github.com/tomochain/tomochain/core/rawdb"

"github.com/tomochain/tomochain/common"
"github.com/tomochain/tomochain/core/rawdb"
"github.com/tomochain/tomochain/core/types"
"github.com/tomochain/tomochain/ethdb"
"github.com/tomochain/tomochain/log"
Expand Down
10 changes: 5 additions & 5 deletions eth/filters/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (
"bytes"
"context"
"fmt"
"github.com/tomochain/tomochain/core/rawdb"
"testing"
"time"

"github.com/tomochain/tomochain/common"
"github.com/tomochain/tomochain/common/bitutil"
"github.com/tomochain/tomochain/core"
"github.com/tomochain/tomochain/core/bloombits"
"github.com/tomochain/tomochain/core/rawdb"
"github.com/tomochain/tomochain/core/types"
"github.com/tomochain/tomochain/ethdb"
"github.com/tomochain/tomochain/event"
Expand Down Expand Up @@ -68,7 +68,7 @@ func benchmarkBloomBits(b *testing.B, sectionSize uint64) {
benchDataDir := node.DefaultDataDir() + "/geth/chaindata"
fmt.Println("Running bloombits benchmark section size:", sectionSize)

db, err := rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024,"")
db, err := rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024, "")
if err != nil {
b.Fatalf("error opening database at %v: %v", benchDataDir, err)
}
Expand Down Expand Up @@ -130,7 +130,7 @@ func benchmarkBloomBits(b *testing.B, sectionSize uint64) {
for i := 0; i < benchFilterCnt; i++ {
if i%20 == 0 {
db.Close()
db, _ = rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024,"")
db, _ = rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024, "")
backend = &testBackend{mux, db, cnt, new(event.Feed), new(event.Feed), new(event.Feed), new(event.Feed)}
}
var addr common.Address
Expand All @@ -148,7 +148,7 @@ func benchmarkBloomBits(b *testing.B, sectionSize uint64) {
}

func forEachKey(db ethdb.Database, startPrefix, endPrefix []byte, fn func(key []byte)) {
it := db.NewIterator(startPrefix,nil)
it := db.NewIterator(startPrefix, nil)
for it.Next() {
key := it.Key()
cmpLen := len(key)
Expand Down Expand Up @@ -176,7 +176,7 @@ func clearBloomBits(db ethdb.Database) {
func BenchmarkNoBloomBits(b *testing.B) {
benchDataDir := node.DefaultDataDir() + "/geth/chaindata"
fmt.Println("Running benchmark without bloombits")
db, err := rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024,"")
db, err := rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024, "")
if err != nil {
b.Fatalf("error opening database at %v: %v", benchDataDir, err)
}
Expand Down
3 changes: 1 addition & 2 deletions rlp/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ import (
"strings"
"sync"

"github.com/tomochain/tomochain/rlp/internal/rlpstruct"

"github.com/holiman/uint256"
"github.com/tomochain/tomochain/rlp/internal/rlpstruct"
)

//lint:ignore ST1012 EOL is not an error.
Expand Down
3 changes: 1 addition & 2 deletions rlp/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import (
"math/big"
"reflect"

"github.com/tomochain/tomochain/rlp/internal/rlpstruct"

"github.com/holiman/uint256"
"github.com/tomochain/tomochain/rlp/internal/rlpstruct"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions rlp/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ import (
"sync"
"testing"

"github.com/tomochain/tomochain/common/math"

"github.com/holiman/uint256"
"github.com/tomochain/tomochain/common/math"
)

type testEncoder struct {
Expand Down

0 comments on commit 260f47e

Please sign in to comment.