mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
refactor
This commit is contained in:
parent
3f05ad9842
commit
456836a14f
1 changed files with 5 additions and 1 deletions
|
|
@ -195,7 +195,11 @@ type stateTracer struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func newStateTracer(ctx *Context, cfg json.RawMessage, chainCfg *params.ChainConfig) (*Tracer, error) {
|
func newStateTracer(ctx *Context, cfg json.RawMessage, chainCfg *params.ChainConfig) (*Tracer, error) {
|
||||||
t := &stateTracer{Balance: make(map[common.Address]*hexutil.Big), Nonce: make(map[common.Address]hexutil.Uint64), Storage: make(map[common.Address]map[common.Hash]common.Hash)}
|
t := &stateTracer{
|
||||||
|
Balance: make(map[common.Address]*hexutil.Big),
|
||||||
|
Nonce: make(map[common.Address]hexutil.Uint64),
|
||||||
|
Storage: make(map[common.Address]map[common.Hash]common.Hash)
|
||||||
|
}
|
||||||
return &Tracer{
|
return &Tracer{
|
||||||
GetResult: func() (json.RawMessage, error) {
|
GetResult: func() (json.RawMessage, error) {
|
||||||
return json.Marshal(t)
|
return json.Marshal(t)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue