chainqueue

Blockchain transaction queue control
Log | Files | Refs | LICENSE

commit e29bc6fa8c511264d40f6f6f0d8b4c2f6fb6c233
parent 6271cd5d3dc150f43be1ae321cdda25859096c60
Author: nolash <dev@holbrook.no>
Date:   Sun,  4 Apr 2021 11:25:13 +0200

Use chain spec in decoder

Diffstat:
Mchainqueue/query.py | 4+---
Msetup.cfg | 2+-
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git 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 @@ -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