Modifications to wrappers and loader forenabling node.attach in utils/core/interfaces

This commit is contained in:
philip-morlier 2021-10-10 13:08:52 -07:00
parent a693104bcb
commit 5b9e5f56e2
No known key found for this signature in database
GPG Key ID: 0323A143B7B6F663
2 changed files with 6 additions and 3 deletions

View File

@ -11,8 +11,8 @@ import (
"reflect" "reflect"
"strings" "strings"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
"gopkg.in/urfave/cli.v1" "gopkg.in/urfave/cli.v1"
) )
@ -53,7 +53,7 @@ var DefaultPluginLoader *PluginLoader
func NewPluginLoader(target string) (*PluginLoader, error) { func NewPluginLoader(target string) (*PluginLoader, error) {
pl := &PluginLoader{ pl := &PluginLoader{
Plugins: []*plugin.Plugin{}, Plugins: []*plugin.Plugin{},
Subcommands: make(map[string]Subcommand), Subcommands: make(map[string]Subcommand),
Flags: []*flag.FlagSet{}, Flags: []*flag.FlagSet{},
LookupCache: make(map[string][]interface{}), LookupCache: make(map[string][]interface{}),
@ -158,7 +158,6 @@ func ParseFlags(args []string) bool {
return DefaultPluginLoader.ParseFlags(args) return DefaultPluginLoader.ParseFlags(args)
} }
type feedWrapper struct { type feedWrapper struct {
feed *event.Feed feed *event.Feed
} }

View File

@ -213,6 +213,10 @@ func (n *Node) ResolvePath(x string) string {
return n.n.ResolvePath(x) return n.n.ResolvePath(x)
} }
func (n *Node) Attach() (core.Client, error) {
return n.n.Attach()
}
type Backend struct { type Backend struct {
b interfaces.Backend b interfaces.Backend
newTxsFeed event.Feed newTxsFeed event.Feed