From 452cea9d76542d5401259c16a8f4b296ed2ed259 Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Mon, 5 Mar 2018 21:21:20 +0700 Subject: [PATCH] Check that alice ETH/ERC20 dex fee is confirmed. --- iguana/exchanges/LP_transaction.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index e71163f78..a374b2aef 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -2131,6 +2131,13 @@ int32_t LP_verify_otherfee(struct basilisk_swap *swap,uint8_t *data,int32_t data //printf("dexfee verified\n"); } else printf("locktime mismatch in otherfee, reject %u vs %u\n",swap->otherfee.I.locktime,swap->I.started+1); +#ifndef NOTETOMIC + if (swap->otherfee.I.ethTxid[0] != 0 && LP_etomic_is_empty_tx_id(swap->otherfee.I.ethTxid) == 0) { + if (LP_etomic_wait_for_confirmation(swap->otherfee.I.ethTxid) < 0) { + return(-1); + } + } +#endif return(0); } else printf("destaddress mismatch in other fee, reject (%s) vs (%s)\n",swap->otherfee.I.destaddr,swap->otherfee.p2shaddr); }