Cleanup formatting, spelling, etc
This commit is contained in:
parent
99a29191b1
commit
61c82b2326
@ -631,7 +631,7 @@ var (
|
|||||||
|
|
||||||
StateDiffFlag = cli.BoolFlag{
|
StateDiffFlag = cli.BoolFlag{
|
||||||
Name: "statediff",
|
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{
|
StateDiffModeFlag = cli.StringFlag{
|
||||||
|
@ -151,7 +151,7 @@ func (sdb *builder) buildDiffEventual(accounts map[common.Address]*state.Account
|
|||||||
sr := val.Root
|
sr := val.Root
|
||||||
storageDiffs, err := sdb.buildStorageDiffsEventual(sr, created)
|
storageDiffs, err := sdb.buildStorageDiffsEventual(sr, created)
|
||||||
if err != nil {
|
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
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package statediff_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/ethereum/go-ethereum/statediff"
|
"github.com/ethereum/go-ethereum/statediff"
|
||||||
"testing"
|
|
||||||
"github.com/ethereum/go-ethereum/statediff/testhelpers"
|
"github.com/ethereum/go-ethereum/statediff/testhelpers"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewMode(t *testing.T) {
|
func TestNewMode(t *testing.T) {
|
||||||
|
@ -13,8 +13,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -65,6 +65,7 @@ func (sds *StateDiffService) Loop(events chan core.ChainEvent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var eventsChannel chan core.ChainEvent
|
var eventsChannel chan core.ChainEvent
|
||||||
|
|
||||||
func (sds *StateDiffService) Start(server *p2p.Server) error {
|
func (sds *StateDiffService) Start(server *p2p.Server) error {
|
||||||
log.Info("Starting statediff service")
|
log.Info("Starting statediff service")
|
||||||
eventsChannel := make(chan core.ChainEvent, 10)
|
eventsChannel := make(chan core.ChainEvent, 10)
|
||||||
|
@ -11,13 +11,10 @@ var (
|
|||||||
BlockNumber = rand.Int63()
|
BlockNumber = rand.Int63()
|
||||||
BlockHash = "0xfa40fbe2d98d98b3363a778d52f2bcd29d6790b9b3f3cab2b167fd12d3550f73"
|
BlockHash = "0xfa40fbe2d98d98b3363a778d52f2bcd29d6790b9b3f3cab2b167fd12d3550f73"
|
||||||
CodeHash = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
|
CodeHash = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
|
||||||
OldNonceValue = rand.Uint64()
|
NewNonceValue = rand.Uint64()
|
||||||
NewNonceValue = OldNonceValue + 1
|
NewBalanceValue = rand.Int63()
|
||||||
OldBalanceValue = rand.Int63()
|
|
||||||
NewBalanceValue = OldBalanceValue - 1
|
|
||||||
ContractRoot = "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
|
ContractRoot = "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
|
||||||
StoragePath = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
|
StoragePath = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
|
||||||
oldStorage = "0x0"
|
|
||||||
newStorage = "0x03"
|
newStorage = "0x03"
|
||||||
storage = map[string]builder.DiffString{StoragePath: {Value: &newStorage}}
|
storage = map[string]builder.DiffString{StoragePath: {Value: &newStorage}}
|
||||||
address = common.HexToAddress("0xaE9BEa628c4Ce503DcFD7E305CaB4e29E7476592")
|
address = common.HexToAddress("0xaE9BEa628c4Ce503DcFD7E305CaB4e29E7476592")
|
||||||
|
Loading…
Reference in New Issue
Block a user