Fix wire generation bug

This commit is contained in:
lash 2022-05-10 19:00:37 +00:00
parent 11b7c4e4e8
commit 63df6aa6c4
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,5 @@
- 0.2.1
* Fix bug in wire format generation for tx
- 0.2.0
* Consolidate genertic blcok, tx and tx result objects
- 0.1.3

View File

@ -19,7 +19,7 @@ class Block(Src):
tx_generator = Tx
def __init__(self, src):
def __init__(self, src=None):
self.number = None
self.txs = []
self.author = None
@ -27,7 +27,7 @@ class Block(Src):
self.get_tx = self.tx_index_by_hash
self.tx = self.tx_by_index
super(Block, self).__init__(src)
super(Block, self).__init__(src=src)
def tx_by_index(self, idx):

View File

@ -28,8 +28,6 @@ class Tx(Src):
self.result = None
self.generate_wire = self.wire
super(Tx, self).__init__(src)
if block != None:
@ -61,9 +59,9 @@ class Tx(Src):
return self.result.status.name
def wire(self):
raise NotImplementedError()
def generate_wire(self, chain_spec):
pass
def as_dict(self):
raise NotImplementedError()
@ -78,7 +76,7 @@ class Tx(Src):
class TxResult(Src):
def __init__(self, src):
def __init__(self, src=None):
self.status = Status.UNKNOWN
self.tx_index = None
self.block_hash = None

View File

@ -3,7 +3,7 @@ name=chainlib
license=WTFPL2
author_email=dev@holbrook.no
description=Generic blockchain access library and tooling
version=0.2.0
version=0.2.1
url=https://gitlab.com/chaintools/chainlib
author=Louis Holbrook