cmd, node, p2p/simulations: fix node account manager leak (#19004)

* node: close AccountsManager in new Close method

* p2p/simulations, p2p/simulations/adapters: handle node close on shutdown

* node: move node ephemeralKeystore cleanup to stop method

* node: call Stop in Node.Close method

* cmd/geth: close node.Node created with makeFullNode in cli commands

* node: close Node instances in tests

* cmd/geth, node: minor code style fixes

* cmd, console, miner, mobile: proper node Close() termination
This commit is contained in:
Janoš Guljaš authored and Péter Szilágyi committed 2019-02-07 12:40:36 +02:00
1 parent 81801ccc2b
commit 26aea73673
16 files changed
+111 -13

No files matched your search

+2
View File
@@ -46,6 +46,8 @@ func ExampleService() {
if err != nil {
log.Fatalf("Failed to create network node: %v", err)
}
defer stack.Close()
// Create and register a simple network service. This is done through the definition
// of a node.ServiceConstructor that will instantiate a node.Service. The reason for
// the factory method approach is to support service restarts without relying on the