forked from cerc-io/plugeth
Add --pluginsdir flag. (#1)
Add a new flag, `--pluginsdir`, for setting the directory where plugins are stored. The default remains `$datadir/plugins`. Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com> Reviewed-on: cerc-io/plugeth#1
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"plugin"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/openrelayxyz/plugeth-utils/core"
|
||||
@@ -58,6 +58,7 @@ func Lookup(name string, validate func(interface{}) bool) []interface{} {
|
||||
var DefaultPluginLoader *PluginLoader
|
||||
|
||||
func NewPluginLoader(target string) (*PluginLoader, error) {
|
||||
log.Info("Loading plugins from directory", "path", target)
|
||||
pl := &PluginLoader{
|
||||
Plugins: []pluginDetails{},
|
||||
Subcommands: make(map[string]Subcommand),
|
||||
|
||||
Reference in New Issue
Block a user