fix wallet server shutdown for tests
This commit is contained in:
parent
b8a3b62f0f
commit
fb6a7442a6
2 changed files with 5 additions and 1 deletions
|
@ -175,7 +175,7 @@ class SPVNode:
|
||||||
|
|
||||||
async def stop(self, cleanup=True):
|
async def stop(self, cleanup=True):
|
||||||
try:
|
try:
|
||||||
await self.controller.shutdown()
|
self.server.db.shutdown()
|
||||||
finally:
|
finally:
|
||||||
cleanup and self.cleanup()
|
cleanup and self.cleanup()
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,10 @@ class DB(object):
|
||||||
# Read TX counts (requires meta directory)
|
# Read TX counts (requires meta directory)
|
||||||
await self._read_tx_counts()
|
await self._read_tx_counts()
|
||||||
|
|
||||||
|
def shutdown(self):
|
||||||
|
self.utxo_db.close()
|
||||||
|
self.history.close_db()
|
||||||
|
|
||||||
async def open_for_compacting(self):
|
async def open_for_compacting(self):
|
||||||
await self._open_dbs(True, True)
|
await self._open_dbs(True, True)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue