modifications made in service of block tracer

This commit is contained in:
philip-morlier
2021-11-05 17:26:53 -07:00
parent f18c3be78f
commit 9ac78685b3
7 changed files with 724 additions and 213 deletions
+5 -3
View File
@@ -41,7 +41,7 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/plugins"
"github.com/ethereum/go-ethereum/plugins/wrappers"
"github.com/ethereum/go-ethereum/plugins/wrappers/backendwrapper"
"gopkg.in/urfave/cli.v1"
)
@@ -307,7 +307,9 @@ func prepare(ctx *cli.Context) {
// It creates a default node based on the command line arguments and runs it in
// blocking mode, waiting for it to be shut down.
func geth(ctx *cli.Context) error {
if err := plugins.Initialize(path.Join(ctx.GlobalString(utils.DataDirFlag.Name), "plugins"), ctx); err != nil { return err }
if err := plugins.Initialize(path.Join(ctx.GlobalString(utils.DataDirFlag.Name), "plugins"), ctx); err != nil {
return err
}
prepare(ctx)
if !plugins.ParseFlags(ctx.Args()) {
if args := ctx.Args(); len(args) > 0 {
@@ -315,7 +317,7 @@ func geth(ctx *cli.Context) error {
}
}
stack, backend := makeFullNode(ctx)
wrapperBackend := wrappers.NewBackend(backend)
wrapperBackend := backendwrapper.NewBackend(backend)
pluginsInitializeNode(stack, wrapperBackend)
if ok, err := plugins.RunSubcommand(ctx); ok {
stack.Close()