Closed smartcontracts closed 6 years ago
Client doesn't decode anything that it receives from ChildChainService. This means that everything using Client needs to manually decode its output.
ChildChainService
Client
For example, get_current_block returns the hex-encoded block:
get_current_block
def get_current_block(self): return self.child_chain.get_current_block()
Instead, it should return the Block object:
Block
import rlp from ethereum import utils ... def get_current_block(self): encoded_block = self.child_chain.get_current_block() return rlp.decode(utils.decode_hex(encoded_block), Block)
Client doesn't decode anything that it receives from
ChildChainService
. This means that everything usingClient
needs to manually decode its output.For example,
get_current_block
returns the hex-encoded block:Instead, it should return the
Block
object: