diff --git a/torba/orchstr8/node.py b/torba/orchstr8/node.py index 683ba58e8..7ebd2f879 100644 --- a/torba/orchstr8/node.py +++ b/torba/orchstr8/node.py @@ -175,7 +175,7 @@ class SPVNode: async def stop(self, cleanup=True): try: - await self.controller.shutdown() + self.server.db.shutdown() finally: cleanup and self.cleanup() diff --git a/torba/server/db.py b/torba/server/db.py index 0d0001abd..a72093610 100644 --- a/torba/server/db.py +++ b/torba/server/db.py @@ -133,6 +133,10 @@ class DB(object): # Read TX counts (requires meta directory) await self._read_tx_counts() + def shutdown(self): + self.utxo_db.close() + self.history.close_db() + async def open_for_compacting(self): await self._open_dbs(True, True)