diff --git a/CHANGELOG b/CHANGELOG index d8813b8..a0dc11b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/chainlib/block.py b/chainlib/block.py index 93a20f7..32b91ca 100644 --- a/chainlib/block.py +++ b/chainlib/block.py @@ -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): diff --git a/chainlib/tx.py b/chainlib/tx.py index 505a5f7..266896f 100644 --- a/chainlib/tx.py +++ b/chainlib/tx.py @@ -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 diff --git a/setup.cfg b/setup.cfg index eca3099..2556118 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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