Updated mod and sum to reflect v1.2.0

Also changed the injection and hook from hooktester to blockchain().
This commit is contained in:
philip-morlier
2023-06-12 13:37:29 -07:00
parent 7434ccb8c8
commit d8d864768a
4 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -356,7 +356,7 @@ func geth(ctx *cli.Context) error {
defer pluginsOnShutdown()
stack.RegisterAPIs(pluginGetAPIs(stack, wrapperBackend))
startNode(ctx, stack, backend, false)
pluginHookTester()
pluginBlockChain()
//end PluGeth code injection
stack.Wait()
return nil
+5 -5
View File
@@ -103,8 +103,8 @@ func pluginsOnShutdown() {
OnShutdown(plugins.DefaultPluginLoader)
}
func HookTester(pl *plugins.PluginLoader) {
fnList := pl.Lookup("HookTester", func(item interface{}) bool {
func BlockChain(pl *plugins.PluginLoader) {
fnList := pl.Lookup("BlockChain", func(item interface{}) bool {
_, ok := item.(func())
return ok
})
@@ -113,10 +113,10 @@ func HookTester(pl *plugins.PluginLoader) {
}
}
func pluginHookTester() {
func pluginBlockChain() {
if plugins.DefaultPluginLoader == nil {
log.Warn("Attempting HookTester, but default PluginLoader has not been initialized")
log.Warn("Attempting BlockChain, but default PluginLoader has not been initialized")
return
}
HookTester(plugins.DefaultPluginLoader)
BlockChain(plugins.DefaultPluginLoader)
}