Use chain spec in decoder

This commit is contained in:
nolash 2021-04-04 11:25:13 +02:00
parent 6271cd5d3d
commit e29bc6fa8c
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 2 additions and 4 deletions

View File

@ -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)

View File

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