Cleanup formatting, spelling, etc

This commit is contained in:
Elizabeth Engelman 2019-01-03 13:51:51 -06:00
parent 99a29191b1
commit 61c82b2326
6 changed files with 12 additions and 14 deletions

View File

@ -631,7 +631,7 @@ var (
StateDiffFlag = cli.BoolFlag{
Name: "statediff",
Usage: "Enables the calculation of state diffs between each block, persists these state diffs the configured persistance mode.",
Usage: "Enables the calculation of state diffs between each block, persists these state diffs the configured persistence mode.",
}
StateDiffModeFlag = cli.StringFlag{

View File

@ -151,7 +151,7 @@ func (sdb *builder) buildDiffEventual(accounts map[common.Address]*state.Account
sr := val.Root
storageDiffs, err := sdb.buildStorageDiffsEventual(sr, created)
if err != nil {
log.Error("Failed building eventual storage diffs", "Address", val, "error", err)
log.Error("Failed building eventual storage diffs", "Address", addr, "error", err)
return nil, err
}

View File

@ -2,8 +2,8 @@ package statediff_test
import (
"github.com/ethereum/go-ethereum/statediff"
"testing"
"github.com/ethereum/go-ethereum/statediff/testhelpers"
"testing"
)
func TestNewMode(t *testing.T) {

View File

@ -13,16 +13,16 @@ import (
"path/filepath"
"reflect"
"strconv"
"testing"
"strings"
"testing"
)
var (
tempDir = os.TempDir()
testFilePrefix = "test-statediff"
publisher p.Publisher
dir string
err error
tempDir = os.TempDir()
testFilePrefix = "test-statediff"
publisher p.Publisher
dir string
err error
)
var expectedCreatedAccountRow = []string{

View File

@ -65,6 +65,7 @@ func (sds *StateDiffService) Loop(events chan core.ChainEvent) {
}
var eventsChannel chan core.ChainEvent
func (sds *StateDiffService) Start(server *p2p.Server) error {
log.Info("Starting statediff service")
eventsChannel := make(chan core.ChainEvent, 10)

View File

@ -11,13 +11,10 @@ var (
BlockNumber = rand.Int63()
BlockHash = "0xfa40fbe2d98d98b3363a778d52f2bcd29d6790b9b3f3cab2b167fd12d3550f73"
CodeHash = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
OldNonceValue = rand.Uint64()
NewNonceValue = OldNonceValue + 1
OldBalanceValue = rand.Int63()
NewBalanceValue = OldBalanceValue - 1
NewNonceValue = rand.Uint64()
NewBalanceValue = rand.Int63()
ContractRoot = "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
StoragePath = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
oldStorage = "0x0"
newStorage = "0x03"
storage = map[string]builder.DiffString{StoragePath: {Value: &newStorage}}
address = common.HexToAddress("0xaE9BEa628c4Ce503DcFD7E305CaB4e29E7476592")