From e29bc6fa8c511264d40f6f6f0d8b4c2f6fb6c233 Mon Sep 17 00:00:00 2001 From: nolash Date: Sun, 4 Apr 2021 11:25:13 +0200 Subject: [PATCH] Use chain spec in decoder --- chainqueue/query.py | 4 +--- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chainqueue/query.py b/chainqueue/query.py index 842a162..848403d 100644 --- a/chainqueue/query.py +++ b/chainqueue/query.py @@ -111,8 +111,6 @@ def get_nonce_tx_cache(chain_spec, nonce, sender, decoder=None, session=None): :returns: Transactions :rtype: dict, with transaction hash as key, signed raw transaction as value """ - chain_id = chain_spec.chain_id() - session = SessionBase.bind_session(session) q = session.query(Otx) q = q.join(TxCache) @@ -277,7 +275,7 @@ def get_upcoming_tx(chain_spec, status=StatusEnum.READYSEND, not_status=None, re continue tx_signed_bytes = bytes.fromhex(o.signed_tx[2:]) - tx = unpack(tx_signed_bytes, chain_id) + tx = decoder(tx_signed_bytes, chain_spec) txs[o.tx_hash] = o.signed_tx q = session.query(TxCache) diff --git a/setup.cfg b/setup.cfg index 1a9f6b5..3321bc2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainqueue -version = 0.0.1a1 +version = 0.0.1a3 description = Generic blockchain transaction queue control author = Louis Holbrook author_email = dev@holbrook.no