def process_reply(self, reply_ep): rtxs = RawTxSpec.from_tx_data(self.ewctrl.model, reply_ep.etx_data.decode('hex')) if self.ewctrl.check_tx(rtxs, self.etx_spec): rtxs.sign(self.etx_spec.my_utxo_list) self.ewctrl.publish_tx(rtxs, self.my_offer) self.etx_data = rtxs.get_hex_tx_data() else: raise Exception('P2ptrade reply tx check failed!')
def test_composed(self): self.basic.add_target(self.assettarget0) self.basic.add_target(self.assettarget1) self.basic.add_target(self.assettarget2) self.add_coins() op = self.transformer.transform(self.basic, 'operational') self.assertEqual(op.get_change_addr(self.colordef0), self.addr0) self.assertEqual(op.get_change_addr(UNCOLORED_MARKER), self.baddr) comp = self.transformer.transform(op, 'composed') self.assertTrue(self.transformer.classify_tx_spec(comp), 'composed') signed = self.transformer.transform(comp, 'signed') self.assertTrue(self.transformer.classify_tx_spec(signed), 'signed') self.assertEqual(len(signed.get_hex_txhash()), 64) txdata = signed.get_tx_data() same = RawTxSpec.from_tx_data(self.model, txdata) self.assertEqual(same.get_hex_tx_data(), signed.get_hex_tx_data()) self.assertRaises(InvalidTransformationError, self.transformer.transform, signed, '')
def process_reply(self, reply_ep): rtxs = RawTxSpec.from_tx_data(self.ewctrl.model, reply_ep.etx_data.decode('hex')) rtxs.sign(self.etx_spec.my_utxo_list) self.ewctrl.publish_tx(rtxs) # TODO: ??? self.etx_data = rtxs.get_hex_tx_data()
def process_reply(self, reply_ep): rtxs = RawTxSpec.from_tx_data(self.ewctrl.model, reply_ep.etx_data.decode('hex')) self.ewctrl.publish_tx(rtxs) # TODO: ???
def process_reply(self, reply_ep): # FIXME how is ever valid to call this function??? rtxs = RawTxSpec.from_tx_data(self.ewctrl.model, reply_ep.etx_data.decode('hex')) self.ewctrl.publish_tx(rtxs, self.my_offer) # TODO: ???