From 9cc0ea93b2049568e6c2c5fdc76428a5e9768920 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 8 Apr 2019 12:48:00 +0200 Subject: [PATCH] chainregistry: stop Neutrino before closing DB To avoid the ChainService still attempting to access the database when it gets closed, re-order the stop order such that the Chainservice gets stopped before closing the DB. --- chainregistry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chainregistry.go b/chainregistry.go index cc3b05ea..48a086a3 100644 --- a/chainregistry.go +++ b/chainregistry.go @@ -736,8 +736,8 @@ func initNeutrinoBackend(chainDir string) (*neutrino.ChainService, func(), error } cleanUp := func() { - db.Close() neutrinoCS.Stop() + db.Close() } return neutrinoCS, cleanUp, nil