@ -40,6 +40,7 @@ import (
"github.com/ethereum/go-ethereum/internal/flags"
"github.com/ethereum/go-ethereum/internal/flags"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/trie"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2"
)
)
@ -125,6 +126,7 @@ func runCmd(ctx *cli.Context) error {
sender = common . BytesToAddress ( [ ] byte ( "sender" ) )
sender = common . BytesToAddress ( [ ] byte ( "sender" ) )
receiver = common . BytesToAddress ( [ ] byte ( "receiver" ) )
receiver = common . BytesToAddress ( [ ] byte ( "receiver" ) )
genesisConfig * core . Genesis
genesisConfig * core . Genesis
preimages = ctx . Bool ( DumpFlag . Name )
)
)
if ctx . Bool ( MachineFlag . Name ) {
if ctx . Bool ( MachineFlag . Name ) {
tracer = logger . NewJSONLogger ( logconfig , os . Stdout )
tracer = logger . NewJSONLogger ( logconfig , os . Stdout )
@ -139,10 +141,12 @@ func runCmd(ctx *cli.Context) error {
genesisConfig = gen
genesisConfig = gen
db := rawdb . NewMemoryDatabase ( )
db := rawdb . NewMemoryDatabase ( )
genesis := gen . MustCommit ( db )
genesis := gen . MustCommit ( db )
statedb , _ = state . New ( genesis . Root ( ) , state . NewDatabase ( db ) , nil )
sdb := state . NewDatabaseWithConfig ( db , & trie . Config { Preimages : preimages } )
statedb , _ = state . New ( genesis . Root ( ) , sdb , nil )
chainConfig = gen . Config
chainConfig = gen . Config
} else {
} else {
statedb , _ = state . New ( common . Hash { } , state . NewDatabase ( rawdb . NewMemoryDatabase ( ) ) , nil )
sdb := state . NewDatabaseWithConfig ( rawdb . NewMemoryDatabase ( ) , & trie . Config { Preimages : preimages } )
statedb , _ = state . New ( common . Hash { } , sdb , nil )
genesisConfig = new ( core . Genesis )
genesisConfig = new ( core . Genesis )
}
}
if ctx . String ( SenderFlag . Name ) != "" {
if ctx . String ( SenderFlag . Name ) != "" {