cmd/geth: fixes db unavailability for chain commands (#21415)

* chaincmd should make config nodes instead of full nodes

* add documentation for using makeConfigNode instead of makeFullNode;

* add documentation to functions

* code style
This commit is contained in:
rene
2020-08-06 09:24:36 +02:00
committed by GitHub
parent 4fde0cabc1
commit d21303f9dd
2 changed files with 9 additions and 6 deletions

View File

@ -105,6 +105,7 @@ func defaultNodeConfig() node.Config {
return cfg
}
// makeConfigNode loads geth configuration and creates a blank node instance.
func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
// Load defaults.
cfg := gethConfig{
@ -145,6 +146,7 @@ func enableWhisper(ctx *cli.Context) bool {
return false
}
// makeFullNode loads geth configuration and creates the Ethereum backend.
func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
stack, cfg := makeConfigNode(ctx)