Use chain spec in decoder
This commit is contained in:
parent
6271cd5d3d
commit
e29bc6fa8c
@ -111,8 +111,6 @@ def get_nonce_tx_cache(chain_spec, nonce, sender, decoder=None, session=None):
|
|||||||
:returns: Transactions
|
:returns: Transactions
|
||||||
:rtype: dict, with transaction hash as key, signed raw transaction as value
|
:rtype: dict, with transaction hash as key, signed raw transaction as value
|
||||||
"""
|
"""
|
||||||
chain_id = chain_spec.chain_id()
|
|
||||||
|
|
||||||
session = SessionBase.bind_session(session)
|
session = SessionBase.bind_session(session)
|
||||||
q = session.query(Otx)
|
q = session.query(Otx)
|
||||||
q = q.join(TxCache)
|
q = q.join(TxCache)
|
||||||
@ -277,7 +275,7 @@ def get_upcoming_tx(chain_spec, status=StatusEnum.READYSEND, not_status=None, re
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
tx_signed_bytes = bytes.fromhex(o.signed_tx[2:])
|
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
|
txs[o.tx_hash] = o.signed_tx
|
||||||
|
|
||||||
q = session.query(TxCache)
|
q = session.query(TxCache)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = chainqueue
|
name = chainqueue
|
||||||
version = 0.0.1a1
|
version = 0.0.1a3
|
||||||
description = Generic blockchain transaction queue control
|
description = Generic blockchain transaction queue control
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user