mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
default live config to empty obj
This commit is contained in:
parent
7c47a44be6
commit
6cf0b434e0
3 changed files with 4 additions and 6 deletions
|
|
@ -2186,7 +2186,7 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
|
|||
}
|
||||
if ctx.IsSet(VMTraceFlag.Name) {
|
||||
if name := ctx.String(VMTraceFlag.Name); name != "" {
|
||||
var config json.RawMessage
|
||||
config := json.RawMessage("{}")
|
||||
if ctx.IsSet(VMTraceJsonConfigFlag.Name) {
|
||||
config = json.RawMessage(ctx.String(VMTraceJsonConfigFlag.Name))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
|
|||
}
|
||||
)
|
||||
if config.VMTrace != "" {
|
||||
var traceConfig json.RawMessage
|
||||
traceConfig := json.RawMessage("{}")
|
||||
if config.VMTraceJsonConfig != "" {
|
||||
traceConfig = json.RawMessage(config.VMTraceJsonConfig)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,10 +92,8 @@ type supplyTracerConfig struct {
|
|||
|
||||
func newSupplyTracer(cfg json.RawMessage) (*tracing.Hooks, error) {
|
||||
var config supplyTracerConfig
|
||||
if cfg != nil {
|
||||
if err := json.Unmarshal(cfg, &config); err != nil {
|
||||
return nil, fmt.Errorf("failed to parse config: %v", err)
|
||||
}
|
||||
if err := json.Unmarshal(cfg, &config); err != nil {
|
||||
return nil, fmt.Errorf("failed to parse config: %v", err)
|
||||
}
|
||||
if config.Path == "" {
|
||||
return nil, errors.New("supply tracer output path is required")
|
||||
|
|
|
|||
Loading…
Reference in a new issue