Added first etc hook into test plugin
This commit is contained in:
parent
399cbbc8fd
commit
5be3014e0b
@ -95,12 +95,6 @@ var (
|
|||||||
Value: flags.DirectoryString(filepath.Join("<datadir>", "plugins")),
|
Value: flags.DirectoryString(filepath.Join("<datadir>", "plugins")),
|
||||||
Category: flags.EthCategory,
|
Category: flags.EthCategory,
|
||||||
}
|
}
|
||||||
// ClassicFlag = &cli.BoolFlag{
|
|
||||||
// Name: "Classic",
|
|
||||||
// Usage: "Sepolia network: pre-configured proof-of-work test network",
|
|
||||||
// Category: flags.EthCategory,
|
|
||||||
// }
|
|
||||||
|
|
||||||
//end PluGeth code injection
|
//end PluGeth code injection
|
||||||
DataDirFlag = &flags.DirectoryFlag{
|
DataDirFlag = &flags.DirectoryFlag{
|
||||||
Name: "datadir",
|
Name: "datadir",
|
||||||
@ -1671,11 +1665,13 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
|||||||
if pluginNetworkId := pluginNetworkId(); pluginNetworkId != nil {
|
if pluginNetworkId := pluginNetworkId(); pluginNetworkId != nil {
|
||||||
cfg.NetworkId = *pluginNetworkId
|
cfg.NetworkId = *pluginNetworkId
|
||||||
}
|
}
|
||||||
if pluginETHDiscoveryURLs := pluginETHDiscoveryURLs(); pluginETHDiscoveryURLs != nil {
|
if cfg.EthDiscoveryURLs == nil {
|
||||||
cfg.EthDiscoveryURLs = pluginETHDiscoveryURLs
|
var lightMode bool
|
||||||
|
if cfg.SyncMode == downloader.LightSync {
|
||||||
|
lightMode = true
|
||||||
}
|
}
|
||||||
if pluginSnapDiscoveryURLs := pluginSnapDiscoveryURLs(); pluginSnapDiscoveryURLs != nil {
|
cfg.EthDiscoveryURLs := pluginETHDiscoveryURLs(lightMode) {
|
||||||
cfg.SnapDiscoveryURLs = pluginSnapDiscoveryURLs
|
cfg.SnapDiscoveryURLs := pluginSnapDiscoveryURLs()
|
||||||
}
|
}
|
||||||
//end PluGeth injection
|
//end PluGeth injection
|
||||||
|
|
||||||
|
@ -41,6 +41,15 @@ func GetAPIs(stack core.Node, backend core.Backend) []core.API {
|
|||||||
// this injection is covered by another test in this package. See documentation for details.
|
// this injection is covered by another test in this package. See documentation for details.
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// cmd/utils/
|
||||||
|
|
||||||
|
func SetSnapDiscoveryURLs() {
|
||||||
|
m := map[string]struct{}{
|
||||||
|
"SetSnapDiscoveryURLs":struct{}{},
|
||||||
|
}
|
||||||
|
hookChan <- m
|
||||||
|
}
|
||||||
|
|
||||||
// core/
|
// core/
|
||||||
|
|
||||||
|
|
||||||
@ -176,12 +185,13 @@ var plugins map[string]struct{} = map[string]struct{}{
|
|||||||
"LivePostProcessBlock": struct{}{},
|
"LivePostProcessBlock": struct{}{},
|
||||||
"LiveCaptureStart": struct{}{},
|
"LiveCaptureStart": struct{}{},
|
||||||
"LiveCaptureState": struct{}{},
|
"LiveCaptureState": struct{}{},
|
||||||
|
"LiveCaptureEnd": struct{}{},
|
||||||
|
"PreTrieCommit": struct{}{},
|
||||||
|
"PostTrieCommit": struct{}{},
|
||||||
// "LiveCaptureFault": struct{}{},
|
// "LiveCaptureFault": struct{}{},
|
||||||
// "LiveCaptureEnter": struct{}{},
|
// "LiveCaptureEnter": struct{}{},
|
||||||
// "LiveCaptureExit": struct{}{},
|
// "LiveCaptureExit": struct{}{},
|
||||||
// "LiveTracerResult": struct{}{},
|
// "LiveTracerResult": struct{}{},
|
||||||
"LiveCaptureEnd": struct{}{},
|
"SetSnapDiscoveryURLs": struct{}{},
|
||||||
"PreTrieCommit": struct{}{},
|
|
||||||
"PostTrieCommit": struct{}{},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +101,12 @@ func BlockChain() {
|
|||||||
delete(plugins, "LiveCaptureStart")
|
delete(plugins, "LiveCaptureStart")
|
||||||
case f("LiveCaptureState"):
|
case f("LiveCaptureState"):
|
||||||
delete(plugins, "LiveCaptureState")
|
delete(plugins, "LiveCaptureState")
|
||||||
|
case f("LiveCaptureEnd"):
|
||||||
|
delete(plugins, "LiveCaptureEnd")
|
||||||
|
case f("PreTrieCommit"):
|
||||||
|
delete(plugins, "PreTrieCommit")
|
||||||
|
case f("PostTrieCommit"):
|
||||||
|
delete(plugins, "PostTrieCommit")
|
||||||
// These methods are not covered by tests at this time
|
// These methods are not covered by tests at this time
|
||||||
// case f("LiveCaptureFault"):
|
// case f("LiveCaptureFault"):
|
||||||
// delete(plugins, "LiveCaptureFault")
|
// delete(plugins, "LiveCaptureFault")
|
||||||
@ -110,12 +116,8 @@ func BlockChain() {
|
|||||||
// delete(plugins, "LiveCaptureExit")
|
// delete(plugins, "LiveCaptureExit")
|
||||||
// case f("LiveTracerResult"):
|
// case f("LiveTracerResult"):
|
||||||
// delete(plugins, "LiveTracerResult")
|
// delete(plugins, "LiveTracerResult")
|
||||||
case f("LiveCaptureEnd"):
|
case f("SetSnapDiscoveryURLs"):
|
||||||
delete(plugins, "LiveCaptureEnd")
|
delete(plugins, "SetSnapDiscoveryURLs")
|
||||||
case f("PreTrieCommit"):
|
|
||||||
delete(plugins, "PreTrieCommit")
|
|
||||||
case f("PostTrieCommit"):
|
|
||||||
delete(plugins, "PostTrieCommit")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user