BaseLedger.stop() should also close the db

This commit is contained in:
Lex Berezhny 2018-06-26 20:41:03 -04:00
parent da265198f1
commit c58a1c9ead
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,3 @@
import asyncio
from orchstr8.testcase import IntegrationTestCase, d2f from orchstr8.testcase import IntegrationTestCase, d2f
from torba.constants import COIN from torba.constants import COIN

View file

@ -193,8 +193,10 @@ class BaseLedger(six.with_metaclass(LedgerRegistry)):
yield self.network.subscribe_headers() yield self.network.subscribe_headers()
yield self.update_accounts() yield self.update_accounts()
@defer.inlineCallbacks
def stop(self): def stop(self):
return self.network.stop() yield self.network.stop()
yield self.db.stop()
@execute_serially @execute_serially
@defer.inlineCallbacks @defer.inlineCallbacks