# synchronous
h = self.send_tx(tx)
self.tx_event.wait()
- return self.receive_tx(h)
+ return self.receive_tx(h, tx)
def send_tx(self, tx):
# asynchronous
self.tx_result = r.get('result')
self.tx_event.set()
- def receive_tx(self,tx_hash):
+ def receive_tx(self, tx_hash, tx):
out = self.tx_result
if out != tx_hash:
return False, "error: " + out
+ run_hook('receive_tx', tx, self)
return True, out