Apply go fmt changes to statediff

This commit is contained in:
Elizabeth Engelman 2019-01-30 17:30:34 -06:00 committed by Ian Norden
parent a5a07b0ced
commit 47a858c8db
6 changed files with 23 additions and 21 deletions

View File

@ -56,6 +56,8 @@ import (
"github.com/ethereum/go-ethereum/p2p/nat" "github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/p2p/netutil" "github.com/ethereum/go-ethereum/p2p/netutil"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/statediff"
"github.com/ethereum/go-ethereum/statediff/service"
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
cli "gopkg.in/urfave/cli.v1" cli "gopkg.in/urfave/cli.v1"
"github.com/ethereum/go-ethereum/statediff/service" "github.com/ethereum/go-ethereum/statediff/service"

View File

@ -113,7 +113,7 @@ func (sdb *builder) collectDiffNodes(a, b trie.NodeIterator) (map[common.Address
it, _ := trie.NewDifferenceIterator(a, b) it, _ := trie.NewDifferenceIterator(a, b)
for { for {
log.Debug("Current Path and Hash", "path", pathToStr(it), "hashold", common.Hash(it.Hash())) log.Debug("Current Path and Hash", "path", pathToStr(it), "hashold", it.Hash())
if it.Leaf() { if it.Leaf() {
// lookup address // lookup address
@ -242,7 +242,7 @@ func buildStorageDiffsFromTrie(it trie.NodeIterator) map[string]DiffStorage {
if it.Leaf() { if it.Leaf() {
log.Debug("Found leaf in storage", "path", pathToStr(it)) log.Debug("Found leaf in storage", "path", pathToStr(it))
path := pathToStr(it) path := pathToStr(it)
storageKey:= hexutil.Encode(it.LeafKey()) storageKey := hexutil.Encode(it.LeafKey())
storageValue := hexutil.Encode(it.LeafBlob()) storageValue := hexutil.Encode(it.LeafBlob())
storageDiffs[path] = DiffStorage{ storageDiffs[path] = DiffStorage{
Key: &storageKey, Key: &storageKey,

View File

@ -2,12 +2,12 @@ package publisher
import ( import (
"encoding/csv" "encoding/csv"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/statediff/builder" "github.com/ethereum/go-ethereum/statediff/builder"
"os" "os"
"path/filepath" "path/filepath"
"strconv" "strconv"
"time" "time"
"github.com/ethereum/go-ethereum/common"
) )
var ( var (