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 | ||||
| 	* Consolidate genertic blcok, tx and tx result objects | ||||
| - 0.1.3 | ||||
|  | ||||
| @ -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): | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user