Progress made on 3/24/23

This commit is contained in:
philip-morlier 2023-03-24 16:05:39 -07:00
parent 4cfa8704a9
commit 7f1b5c5f9b
2 changed files with 19 additions and 14 deletions

View File

@ -102,3 +102,22 @@ func pluginsOnShutdown() {
}
OnShutdown(plugins.DefaultPluginLoader)
}
func HookTester(pl *plugins.PluginLoader) {
fnList := pl.Lookup("HookTester", func(item interface{}) bool {
_, ok := item.(func())
return ok
})
for _, fni := range fnList {
fni.(func())()
}
}
func pluginHookTester() {
if plugins.DefaultPluginLoader == nil {
log.Warn("Attempting HookTester, but default PluginLoader has not been initialized")
return
}
HookTester(plugins.DefaultPluginLoader)
}

View File

@ -2,32 +2,18 @@ package ethconfig
import (
"github.com/ethereum/go-ethereum/log"
// "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/plugins"
"github.com/ethereum/go-ethereum/plugins/wrappers"
wengine "github.com/ethereum/go-ethereum/plugins/wrappers/engine"
"github.com/ethereum/go-ethereum/plugins/wrappers/backendwrapper"
// "github.com/ethereum/go-ethereum/rpc"
"github.com/openrelayxyz/plugeth-utils/core"
"github.com/openrelayxyz/plugeth-utils/restricted"
// "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
// "github.com/ethereum/go-ethereum/consensus/beacon"
// "github.com/ethereum/go-ethereum/consensus/clique"
// "github.com/ethereum/go-ethereum/consensus/ethash"
// "github.com/ethereum/go-ethereum/core"
// "github.com/ethereum/go-ethereum/core/txpool"
// "github.com/ethereum/go-ethereum/eth/downloader"
// "github.com/ethereum/go-ethereum/eth/gasprice"
"github.com/ethereum/go-ethereum/ethdb"
// "github.com/ethereum/go-ethereum/log"
// "github.com/ethereum/go-ethereum/miner"
"github.com/ethereum/go-ethereum/node"
// "github.com/ethereum/go-ethereum/params"
pconsensus "github.com/openrelayxyz/plugeth-utils/restricted/consensus"
// pparams "github.com/openrelayxyz/plugeth-utils/restricted/params"
)