From d8d864768ad645ef72c89fa57b4e89ccc11b581b Mon Sep 17 00:00:00 2001 From: philip-morlier Date: Mon, 12 Jun 2023 13:37:29 -0700 Subject: [PATCH] Updated mod and sum to reflect v1.2.0 Also changed the injection and hook from hooktester to blockchain(). --- cmd/geth/main.go | 2 +- cmd/geth/plugin_hooks.go | 10 +++++----- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 40e6b6cfe..71e88af2c 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -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 diff --git a/cmd/geth/plugin_hooks.go b/cmd/geth/plugin_hooks.go index 73ff14884..2a1053c3a 100644 --- a/cmd/geth/plugin_hooks.go +++ b/cmd/geth/plugin_hooks.go @@ -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) } \ No newline at end of file diff --git a/go.mod b/go.mod index 71c374bd0..d02b0b15a 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/mattn/go-isatty v0.0.16 github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 github.com/olekukonko/tablewriter v0.0.5 - github.com/openrelayxyz/plugeth-utils v1.1.0 + github.com/openrelayxyz/plugeth-utils v1.2.0 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 github.com/rs/cors v1.7.0 github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible diff --git a/go.sum b/go.sum index 225d0091a..5b2df071a 100644 --- a/go.sum +++ b/go.sum @@ -349,8 +349,8 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/openrelayxyz/plugeth-utils v1.1.0 h1:pK02TCFT32G/o/GNgAF+i3CihWfa/G71i0/vB9PHG3k= -github.com/openrelayxyz/plugeth-utils v1.1.0/go.mod h1:W1Hwwhv04MCuNCcI6a62/kL6eWbH7OO+KvpBEyQTgIs= +github.com/openrelayxyz/plugeth-utils v1.2.0 h1:H8r4P9XER1dRvFzCBK3AUjfjN6hXQkxGGpIlhc6nXFo= +github.com/openrelayxyz/plugeth-utils v1.2.0/go.mod h1:W1Hwwhv04MCuNCcI6a62/kL6eWbH7OO+KvpBEyQTgIs= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=