Config plugin hooks and injections with test coverage.
All config hooks have been written with the exception of writing the genesis.
This commit is contained in:
@@ -43,11 +43,44 @@ func GetAPIs(stack core.Node, backend core.Backend) []core.API {
|
||||
|
||||
// cmd/utils/
|
||||
|
||||
func SetSnapDiscoveryURLs() {
|
||||
func SetDefaultDataDir(arg string) string {
|
||||
m := map[string]struct{}{
|
||||
"SetDefaultDataDir":struct{}{},
|
||||
}
|
||||
hookChan <- m
|
||||
return "test"
|
||||
}
|
||||
|
||||
func SetBootstrapNodes() []string {
|
||||
m := map[string]struct{}{
|
||||
"SetBootstrapNodes":struct{}{},
|
||||
}
|
||||
hookChan <- m
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetNetworkId() *uint64 {
|
||||
m := map[string]struct{}{
|
||||
"SetNetworkId":struct{}{},
|
||||
}
|
||||
hookChan <- m
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetETHDiscoveryURLs(arg bool) []string {
|
||||
m := map[string]struct{}{
|
||||
"SetETHDiscoveryURLs":struct{}{},
|
||||
}
|
||||
hookChan <- m
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetSnapDiscoveryURLs() []string {
|
||||
m := map[string]struct{}{
|
||||
"SetSnapDiscoveryURLs":struct{}{},
|
||||
}
|
||||
hookChan <- m
|
||||
return nil
|
||||
}
|
||||
|
||||
// core/
|
||||
@@ -192,6 +225,10 @@ var plugins map[string]struct{} = map[string]struct{}{
|
||||
// "LiveCaptureEnter": struct{}{},
|
||||
// "LiveCaptureExit": struct{}{},
|
||||
// "LiveTracerResult": struct{}{},
|
||||
"SetDefaultDataDir":struct{}{},
|
||||
"SetBootstrapNodes":struct{}{},
|
||||
"SetNetworkId":struct{}{},
|
||||
"SetETHDiscoveryURLs": struct{}{},
|
||||
"SetSnapDiscoveryURLs": struct{}{},
|
||||
}
|
||||
|
||||
|
||||
@@ -116,8 +116,16 @@ func BlockChain() {
|
||||
// delete(plugins, "LiveCaptureExit")
|
||||
// case f("LiveTracerResult"):
|
||||
// delete(plugins, "LiveTracerResult")
|
||||
case f("SetDefaultDataDir"):
|
||||
delete(plugins, "SetDefaultDataDir")
|
||||
case f("SetBootstrapNodes"):
|
||||
delete(plugins, "SetBootstrapNodes")
|
||||
case f("SetNetworkId"):
|
||||
delete(plugins, "SetNetworkId")
|
||||
case f("SetETHDiscoveryURLs"):
|
||||
delete(plugins, "SetETHDiscoveryURLs")
|
||||
case f("SetSnapDiscoveryURLs"):
|
||||
delete(plugins, "SetSnapDiscoveryURLs")
|
||||
delete(plugins, "SetSnapDiscoveryURLs")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
[Eth]
|
||||
NetworkId = 6448
|
||||
SyncMode = "snap"
|
||||
EthDiscoveryURLs = []
|
||||
SnapDiscoveryURLs = []
|
||||
NoPruning = false
|
||||
NoPrefetch = false
|
||||
TxLookupLimit = 2350000
|
||||
|
||||
Reference in New Issue
Block a user