mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Revert "eth: set live tracer after inited"
This reverts commit d33b24cbd68cedb0ac5502b3ef44981eef6ab531. Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
61ac985a93
commit
0daacd3235
1 changed files with 13 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
package eth
|
package eth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
@ -41,6 +42,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/eth/gasprice"
|
"github.com/ethereum/go-ethereum/eth/gasprice"
|
||||||
"github.com/ethereum/go-ethereum/eth/protocols/eth"
|
"github.com/ethereum/go-ethereum/eth/protocols/eth"
|
||||||
"github.com/ethereum/go-ethereum/eth/protocols/snap"
|
"github.com/ethereum/go-ethereum/eth/protocols/snap"
|
||||||
|
"github.com/ethereum/go-ethereum/eth/tracers"
|
||||||
"github.com/ethereum/go-ethereum/ethdb"
|
"github.com/ethereum/go-ethereum/ethdb"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/ethereum/go-ethereum/event"
|
||||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
"github.com/ethereum/go-ethereum/internal/ethapi"
|
||||||
|
|
@ -194,6 +196,17 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
|
||||||
StateScheme: scheme,
|
StateScheme: scheme,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
if config.VMTrace != "" {
|
||||||
|
var traceConfig json.RawMessage
|
||||||
|
if config.VMTraceJsonConfig != "" {
|
||||||
|
traceConfig = json.RawMessage(config.VMTraceJsonConfig)
|
||||||
|
}
|
||||||
|
t, err := tracers.LiveDirectory.New(config.VMTrace, traceConfig)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("failed to create tracer %s: %v", config.VMTrace, err)
|
||||||
|
}
|
||||||
|
vmConfig.Tracer = t
|
||||||
|
}
|
||||||
// Override the chain config with provided settings.
|
// Override the chain config with provided settings.
|
||||||
var overrides core.ChainOverrides
|
var overrides core.ChainOverrides
|
||||||
if config.OverrideCancun != nil {
|
if config.OverrideCancun != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue