def send_tx4_sig(self):
"""Send partial signature on TX4 (out of TX0)
to Carol for her to complete sign and broadcast.
"""
utxo_in = self.tx0.txid + ":" + str(self.tx0.pay_out_index)
self.tx4 = CoinSwapTX45.from_params(self.coinswap_parameters.pubkeys["key_2_2_AC_0"],
self.coinswap_parameters.pubkeys["key_2_2_AC_1"],
utxo_in=utxo_in,
destination_address=self.coinswap_parameters.output_addresses["tx4_address"],
destination_amount=self.coinswap_parameters.tx4_amounts["carol"],
carol_change_address=None,
carol_change_amount=None)
self.tx4.sign_at_index(self.keyset["key_2_2_AC_0"][0], 0)
sig = self.tx4.signatures[0][0]
self.send(sig, self.tx5.txid)
self.tx4broadcast_counter = 0
self.loop_tx4 = task.LoopingCall(self.wait_for_tx4_confirmation)
self.loop_tx4.start(3.0)
return (True, "TX4 signature sent.")
评论列表
文章目录