Added IsShanghai to test, increased size of hookChan in test to occomodate.
This commit is contained in:
parent
fd7b4068cd
commit
3c9d3b52b0
@ -243,7 +243,8 @@ func RPCSubscriptionTest() {
|
||||
|
||||
// params/
|
||||
|
||||
func Is1559(*big.Int) bool { // while this hook resides in params the injections are in consensus/misc/ (2), and core/ (2) and miner/ (1)
|
||||
// Is1559 is written in params/ the injections are in: consensus/misc/ (2), and core/ (2) and miner/ (1)
|
||||
func Is1559(*big.Int) bool {
|
||||
m := map[string]struct{}{
|
||||
"Is1559":struct{}{},
|
||||
}
|
||||
@ -251,9 +252,19 @@ func Is1559(*big.Int) bool { // while this hook resides in params the injections
|
||||
return true
|
||||
}
|
||||
|
||||
// the following two hooks are both testing the PluginEIPCheck() hook
|
||||
|
||||
func Is160(num *big.Int) bool {
|
||||
m := map[string]struct{}{
|
||||
"PluginEIPCheck":struct{}{},
|
||||
"Is160":struct{}{},
|
||||
}
|
||||
hookChan <- m
|
||||
return true
|
||||
}
|
||||
|
||||
func IsShanghai(num *big.Int) bool {
|
||||
m := map[string]struct{}{
|
||||
"IsShanghai":struct{}{},
|
||||
}
|
||||
hookChan <- m
|
||||
return true
|
||||
@ -300,6 +311,7 @@ var plugins map[string]struct{} = map[string]struct{}{
|
||||
"ForkIDs": struct{}{},
|
||||
"OpCodeSelect":struct{}{},
|
||||
"Is1559":struct{}{},
|
||||
"PluginEIPCheck":struct{}{},
|
||||
"Is160":struct{}{},
|
||||
"IsShanghai":struct{}{},
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"github.com/openrelayxyz/plugeth-utils/restricted/crypto"
|
||||
)
|
||||
|
||||
var hookChan chan map[string]struct{} = make(chan map[string]struct{}, 10)
|
||||
var hookChan chan map[string]struct{} = make(chan map[string]struct{}, 20)
|
||||
var quit chan string = make(chan string)
|
||||
|
||||
func (service *engineService) CaptureShutdown(ctx context.Context) {
|
||||
@ -136,8 +136,10 @@ func BlockChain() {
|
||||
delete(plugins, "OpCodeSelect")
|
||||
case f("Is1559"):
|
||||
delete(plugins, "Is1559")
|
||||
case f("PluginEIPCheck"):
|
||||
delete(plugins, "PluginEIPCheck")
|
||||
case f("Is160"):
|
||||
delete(plugins, "Is160")
|
||||
case f("IsShanghai"):
|
||||
delete(plugins, "IsShanghai")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user