From 771c2e7cc3b139c10218e6cd3ac950895265a48e Mon Sep 17 00:00:00 2001 From: philip-morlier Date: Mon, 23 Oct 2023 17:40:33 -0700 Subject: [PATCH] Added OpCodeSelect() to test plugin --- plugins/test-plugin/hooks.go | 11 +++++++++++ plugins/test-plugin/main.go | 2 ++ 2 files changed, 13 insertions(+) diff --git a/plugins/test-plugin/hooks.go b/plugins/test-plugin/hooks.go index 1a60266a1..7d83da914 100644 --- a/plugins/test-plugin/hooks.go +++ b/plugins/test-plugin/hooks.go @@ -177,6 +177,16 @@ func StateUpdate(blockRoot core.Hash, parentRoot core.Hash, coreDestructs map[co hookChan <- m } +// core/vm/ + +func OpCodeSelect() []int { + m := map[string]struct{}{ + "OpCodeSelect":struct{}{}, + } + hookChan <- m + return nil +} + // rpc/ @@ -247,5 +257,6 @@ var plugins map[string]struct{} = map[string]struct{}{ "SetETHDiscoveryURLs": struct{}{}, "SetSnapDiscoveryURLs": struct{}{}, "ForkIDs": struct{}{}, + "OpCodeSelect":struct{}{}, } diff --git a/plugins/test-plugin/main.go b/plugins/test-plugin/main.go index 313e87572..766bc8cc8 100644 --- a/plugins/test-plugin/main.go +++ b/plugins/test-plugin/main.go @@ -128,6 +128,8 @@ func BlockChain() { delete(plugins, "SetSnapDiscoveryURLs") case f("ForkIDs"): delete(plugins, "ForkIDs") + case f("OpCodeSelect"): + delete(plugins, "OpCodeSelect") } } }