Log events when xmr refund and refund spend txns are seen.

This commit is contained in:
tecnovert
2021-12-16 14:26:21 +02:00
parent 4a7eff0118
commit 82e2b128c9
3 changed files with 17 additions and 3 deletions

View File

@@ -3375,6 +3375,7 @@ class BasicSwap(BaseApp):
elif spending_txid == xmr_swap.a_lock_refund_tx_id:
self.log.debug('Coin a lock tx spent by lock refund tx.')
bid.setState(BidStates.XMR_SWAP_SCRIPT_TX_PREREFUND)
self.logBidEvent(bid.bid_id, EventLogTypes.LOCK_TX_A_REFUND_TX_SEEN, '', session)
else:
self.setBidError(bid.bid_id, bid, 'Unexpected txn spent coin a lock tx: {}'.format(spend_txid_hex), save_bid=False)
@@ -3409,6 +3410,7 @@ class BasicSwap(BaseApp):
if spending_txid == xmr_swap.a_lock_refund_spend_tx_id:
self.log.info('Found coin a lock refund spend tx, bid {}'.format(bid_id.hex()))
self.logBidEvent(bid.bid_id, EventLogTypes.LOCK_TX_A_REFUND_SPEND_TX_SEEN, '', session)
if bid.was_sent:
xmr_swap.a_lock_refund_spend_tx = bytes.fromhex(spend_txn['hex']) # Replace with fully signed tx