Skip to content

Commit

Permalink
Merge pull request #62 from Fantom-foundation/wasuwee/fix-format
Browse files Browse the repository at this point in the history
fix formatting
  • Loading branch information
wsodsong authored Apr 9, 2024
2 parents ab1848b + 4a891d5 commit b11389b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions db/substate_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ package db
import (
"encoding/binary"
"fmt"
"github.com/syndtr/goleveldb/leveldb/util"

"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"

"github.com/Fantom-foundation/Substate/rlp"
"github.com/Fantom-foundation/Substate/substate"
trlp "github.com/Fantom-foundation/Substate/types/rlp"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/syndtr/goleveldb/leveldb/util"
)

const SubstateDBPrefix = "1s" // SubstateDBPrefix + block (64-bit) + tx (64-bit) -> substateRLP
Expand Down
2 changes: 1 addition & 1 deletion db/substate_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package db

import (
"fmt"
"github.com/Fantom-foundation/Substate/substate"
"runtime"
"sort"
"sync"
"sync/atomic"
"time"

"github.com/Fantom-foundation/Substate/substate"
"github.com/urfave/cli/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion db/update_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var testUpdateSet = &updateset.UpdateSet{
Block: 1,
}

var testDeletedAccounts = []types.Address{types.Address{3}, types.Address{4}}
var testDeletedAccounts = []types.Address{{3}, {4}}

func TestUpdateDB_PutUpdateSet(t *testing.T) {
dbPath := t.TempDir() + "test-db"
Expand Down
2 changes: 1 addition & 1 deletion substate/world_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (ws WorldState) EstimateIncrementalSize(y WorldState) uint64 {
continue
}
// update storage by y
for key, _ := range yAcc.Storage {
for key := range yAcc.Storage {
// only add new storage keys
if _, found := ws[yAddr].Storage[key]; !found {
size += sizeOfHash // add sizeof(types.Hash)
Expand Down

0 comments on commit b11389b

Please sign in to comment.