Fix wire generation bug
This commit is contained in:
parent
11b7c4e4e8
commit
63df6aa6c4
@ -1,3 +1,5 @@
|
|||||||
|
- 0.2.1
|
||||||
|
* Fix bug in wire format generation for tx
|
||||||
- 0.2.0
|
- 0.2.0
|
||||||
* Consolidate genertic blcok, tx and tx result objects
|
* Consolidate genertic blcok, tx and tx result objects
|
||||||
- 0.1.3
|
- 0.1.3
|
||||||
|
@ -19,7 +19,7 @@ class Block(Src):
|
|||||||
|
|
||||||
tx_generator = Tx
|
tx_generator = Tx
|
||||||
|
|
||||||
def __init__(self, src):
|
def __init__(self, src=None):
|
||||||
self.number = None
|
self.number = None
|
||||||
self.txs = []
|
self.txs = []
|
||||||
self.author = None
|
self.author = None
|
||||||
@ -27,7 +27,7 @@ class Block(Src):
|
|||||||
self.get_tx = self.tx_index_by_hash
|
self.get_tx = self.tx_index_by_hash
|
||||||
self.tx = self.tx_by_index
|
self.tx = self.tx_by_index
|
||||||
|
|
||||||
super(Block, self).__init__(src)
|
super(Block, self).__init__(src=src)
|
||||||
|
|
||||||
|
|
||||||
def tx_by_index(self, idx):
|
def tx_by_index(self, idx):
|
||||||
|
@ -28,8 +28,6 @@ class Tx(Src):
|
|||||||
|
|
||||||
self.result = None
|
self.result = None
|
||||||
|
|
||||||
self.generate_wire = self.wire
|
|
||||||
|
|
||||||
super(Tx, self).__init__(src)
|
super(Tx, self).__init__(src)
|
||||||
|
|
||||||
if block != None:
|
if block != None:
|
||||||
@ -61,8 +59,8 @@ class Tx(Src):
|
|||||||
return self.result.status.name
|
return self.result.status.name
|
||||||
|
|
||||||
|
|
||||||
def wire(self):
|
def generate_wire(self, chain_spec):
|
||||||
raise NotImplementedError()
|
pass
|
||||||
|
|
||||||
|
|
||||||
def as_dict(self):
|
def as_dict(self):
|
||||||
@ -78,7 +76,7 @@ class Tx(Src):
|
|||||||
|
|
||||||
class TxResult(Src):
|
class TxResult(Src):
|
||||||
|
|
||||||
def __init__(self, src):
|
def __init__(self, src=None):
|
||||||
self.status = Status.UNKNOWN
|
self.status = Status.UNKNOWN
|
||||||
self.tx_index = None
|
self.tx_index = None
|
||||||
self.block_hash = None
|
self.block_hash = None
|
||||||
|
@ -3,7 +3,7 @@ name=chainlib
|
|||||||
license=WTFPL2
|
license=WTFPL2
|
||||||
author_email=dev@holbrook.no
|
author_email=dev@holbrook.no
|
||||||
description=Generic blockchain access library and tooling
|
description=Generic blockchain access library and tooling
|
||||||
version=0.2.0
|
version=0.2.1
|
||||||
url=https://gitlab.com/chaintools/chainlib
|
url=https://gitlab.com/chaintools/chainlib
|
||||||
author=Louis Holbrook
|
author=Louis Holbrook
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user