mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
88086e820e
commit
c9f2b73861
6 changed files with 30 additions and 12 deletions
|
|
@ -80,7 +80,7 @@ It expects the genesis file or the network name [ mainnet | testnet | devnet ] a
|
|||
utils.MetricsInfluxDBBucketFlag,
|
||||
utils.MetricsInfluxDBOrganizationFlag,
|
||||
utils.VMTraceFlag,
|
||||
utils.VMTraceConfigFlag,
|
||||
utils.VMTraceJsonConfigFlag,
|
||||
}, utils.DatabaseFlags),
|
||||
Description: `
|
||||
The import command imports blocks from an RLP-encoded form. The form can be one file
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ var (
|
|||
utils.Enable0xPrefixFlag,
|
||||
utils.EnableXDCPrefixFlag,
|
||||
utils.VMTraceFlag,
|
||||
utils.VMTraceConfigFlag,
|
||||
utils.VMTraceJsonConfigFlag,
|
||||
utils.NetworkIdFlag,
|
||||
utils.HTTPCORSDomainFlag,
|
||||
utils.AuthListenFlag,
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ var (
|
|||
Usage: "Name of tracer which should record internal VM operations (costly)",
|
||||
Category: flags.VMCategory,
|
||||
}
|
||||
VMTraceConfigFlag = &cli.StringFlag{
|
||||
VMTraceJsonConfigFlag = &cli.StringFlag{
|
||||
Name: "vmtrace-config",
|
||||
Usage: "Tracer configuration (JSON)",
|
||||
Category: flags.VMCategory,
|
||||
|
|
@ -1674,12 +1674,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
|||
if ctx.IsSet(VMTraceFlag.Name) {
|
||||
if name := ctx.String(VMTraceFlag.Name); name != "" {
|
||||
var config string
|
||||
if ctx.IsSet(VMTraceConfigFlag.Name) {
|
||||
config = ctx.String(VMTraceConfigFlag.Name)
|
||||
if ctx.IsSet(VMTraceJsonConfigFlag.Name) {
|
||||
config = ctx.String(VMTraceJsonConfigFlag.Name)
|
||||
}
|
||||
|
||||
cfg.VMTrace = name
|
||||
cfg.VMTraceConfig = config
|
||||
cfg.VMTraceJsonConfig = config
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1863,8 +1863,8 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (chain *core.B
|
|||
if ctx.IsSet(VMTraceFlag.Name) {
|
||||
if name := ctx.String(VMTraceFlag.Name); name != "" {
|
||||
var config json.RawMessage
|
||||
if ctx.IsSet(VMTraceConfigFlag.Name) {
|
||||
config = json.RawMessage(ctx.String(VMTraceConfigFlag.Name))
|
||||
if ctx.IsSet(VMTraceJsonConfigFlag.Name) {
|
||||
config = json.RawMessage(ctx.String(VMTraceJsonConfigFlag.Name))
|
||||
}
|
||||
t, err := tracers.LiveDirectory.New(name, config)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -188,8 +188,8 @@ func New(stack *node.Node, config *ethconfig.Config, XDCXServ *XDCx.XDCX, lendin
|
|||
)
|
||||
if config.VMTrace != "" {
|
||||
var traceConfig json.RawMessage
|
||||
if config.VMTraceConfig != "" {
|
||||
traceConfig = json.RawMessage(config.VMTraceConfig)
|
||||
if config.VMTraceJsonConfig != "" {
|
||||
traceConfig = json.RawMessage(config.VMTraceJsonConfig)
|
||||
}
|
||||
t, err := tracers.LiveDirectory.New(config.VMTrace, traceConfig)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ type Config struct {
|
|||
EnablePreimageRecording bool
|
||||
|
||||
// Enables VM tracing
|
||||
VMTrace string
|
||||
VMTraceConfig string
|
||||
VMTrace string
|
||||
VMTraceJsonConfig string
|
||||
|
||||
// RPCGasCap is the global gas cap for eth-call variants.
|
||||
RPCGasCap uint64
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
|||
NetworkId uint64
|
||||
SyncMode downloader.SyncMode
|
||||
NoPruning bool
|
||||
NoPrefetch bool
|
||||
LightServ int `toml:",omitempty"`
|
||||
LightPeers int `toml:",omitempty"`
|
||||
SkipBcVersionCheck bool `toml:"-"`
|
||||
|
|
@ -40,6 +41,8 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
|||
TxPool txpool.Config
|
||||
GPO gasprice.Config
|
||||
EnablePreimageRecording bool
|
||||
VMTrace string
|
||||
VMTraceJsonConfig string
|
||||
RPCGasCap uint64
|
||||
RPCTxFeeCap float64
|
||||
}
|
||||
|
|
@ -48,6 +51,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
|||
enc.NetworkId = c.NetworkId
|
||||
enc.SyncMode = c.SyncMode
|
||||
enc.NoPruning = c.NoPruning
|
||||
enc.NoPrefetch = c.NoPrefetch
|
||||
enc.LightServ = c.LightServ
|
||||
enc.LightPeers = c.LightPeers
|
||||
enc.SkipBcVersionCheck = c.SkipBcVersionCheck
|
||||
|
|
@ -65,6 +69,8 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
|||
enc.TxPool = c.TxPool
|
||||
enc.GPO = c.GPO
|
||||
enc.EnablePreimageRecording = c.EnablePreimageRecording
|
||||
enc.VMTrace = c.VMTrace
|
||||
enc.VMTraceJsonConfig = c.VMTraceJsonConfig
|
||||
enc.RPCGasCap = c.RPCGasCap
|
||||
enc.RPCTxFeeCap = c.RPCTxFeeCap
|
||||
return &enc, nil
|
||||
|
|
@ -77,6 +83,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
|||
NetworkId *uint64
|
||||
SyncMode *downloader.SyncMode
|
||||
NoPruning *bool
|
||||
NoPrefetch *bool
|
||||
LightServ *int `toml:",omitempty"`
|
||||
LightPeers *int `toml:",omitempty"`
|
||||
SkipBcVersionCheck *bool `toml:"-"`
|
||||
|
|
@ -94,6 +101,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
|||
TxPool *txpool.Config
|
||||
GPO *gasprice.Config
|
||||
EnablePreimageRecording *bool
|
||||
VMTrace *string
|
||||
VMTraceJsonConfig *string
|
||||
RPCGasCap *uint64
|
||||
RPCTxFeeCap *float64
|
||||
}
|
||||
|
|
@ -113,6 +122,9 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
|||
if dec.NoPruning != nil {
|
||||
c.NoPruning = *dec.NoPruning
|
||||
}
|
||||
if dec.NoPrefetch != nil {
|
||||
c.NoPrefetch = *dec.NoPrefetch
|
||||
}
|
||||
if dec.LightServ != nil {
|
||||
c.LightServ = *dec.LightServ
|
||||
}
|
||||
|
|
@ -164,6 +176,12 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
|||
if dec.EnablePreimageRecording != nil {
|
||||
c.EnablePreimageRecording = *dec.EnablePreimageRecording
|
||||
}
|
||||
if dec.VMTrace != nil {
|
||||
c.VMTrace = *dec.VMTrace
|
||||
}
|
||||
if dec.VMTraceJsonConfig != nil {
|
||||
c.VMTraceJsonConfig = *dec.VMTraceJsonConfig
|
||||
}
|
||||
if dec.RPCGasCap != nil {
|
||||
c.RPCGasCap = *dec.RPCGasCap
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue