funga

Signer and keystore daemon and library for cryptocurrency software development
Log | Files | Refs | README | LICENSE

commit c287e1dae7c1f3609a75209fb0cffe1be9490431
parent 27374e2ad4b775141e576f9e440bf946eb078f17
Author: nolash <dev@holbrook.no>
Date:   Sun, 28 Feb 2021 08:39:15 +0100

Plug db session leak

Diffstat:
Mcrypto_dev_signer/keystore/postgres.py | 4+++-
Mcrypto_dev_signer/runnable/signer.py | 1+
Msetup.py | 2+-
3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/crypto_dev_signer/keystore/postgres.py b/crypto_dev_signer/keystore/postgres.py @@ -43,7 +43,7 @@ class ReferenceKeystore(Keystore): self.db_session = sessionmaker(bind=self.db_engine)() for s in self.schema: self.db_session.execute(s) - self.db_session.commit() + self.db_session.commit() self.symmetric_key = kwargs.get('symmetric_key') @@ -62,7 +62,9 @@ class ReferenceKeystore(Keystore): try: k = r.first()[0] except TypeError: + self.db_session.rollback() raise UnknownAccountError(address) + self.db_session.commit() return self._decrypt(k, password) diff --git a/crypto_dev_signer/runnable/signer.py b/crypto_dev_signer/runnable/signer.py @@ -24,6 +24,7 @@ config_dir = '.' db = None signer = None +session = None chainId = 8995 socket_path = '/run/crypto-dev-signer/jsonrpc.ipc' diff --git a/setup.py b/setup.py @@ -24,7 +24,7 @@ f.close() setup( name="crypto-dev-signer", - version="0.4.13rc2", + version="0.4.13rc3", description="A signer and keystore daemon and library for cryptocurrency software development", author="Louis Holbrook", author_email="dev@holbrook.no",