From 5b9e5f56e2a7e9dfb264596ff4ceb2bae90c48da Mon Sep 17 00:00:00 2001 From: philip-morlier Date: Sun, 10 Oct 2021 13:08:52 -0700 Subject: [PATCH] Modifications to wrappers and loader forenabling node.attach in utils/core/interfaces --- plugins/plugin_loader.go | 5 ++--- plugins/wrappers/wrappers.go | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/plugin_loader.go b/plugins/plugin_loader.go index 358cb6285..5fa6402f1 100644 --- a/plugins/plugin_loader.go +++ b/plugins/plugin_loader.go @@ -11,8 +11,8 @@ import ( "reflect" "strings" - "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/log" "gopkg.in/urfave/cli.v1" ) @@ -53,7 +53,7 @@ var DefaultPluginLoader *PluginLoader func NewPluginLoader(target string) (*PluginLoader, error) { pl := &PluginLoader{ - Plugins: []*plugin.Plugin{}, + Plugins: []*plugin.Plugin{}, Subcommands: make(map[string]Subcommand), Flags: []*flag.FlagSet{}, LookupCache: make(map[string][]interface{}), @@ -158,7 +158,6 @@ func ParseFlags(args []string) bool { return DefaultPluginLoader.ParseFlags(args) } - type feedWrapper struct { feed *event.Feed } diff --git a/plugins/wrappers/wrappers.go b/plugins/wrappers/wrappers.go index 999710de6..5b9c12661 100644 --- a/plugins/wrappers/wrappers.go +++ b/plugins/wrappers/wrappers.go @@ -213,6 +213,10 @@ func (n *Node) ResolvePath(x string) string { return n.n.ResolvePath(x) } +func (n *Node) Attach() (core.Client, error) { + return n.n.Attach() +} + type Backend struct { b interfaces.Backend newTxsFeed event.Feed