Browse Source

Check for ETH tx existence 10 times before aborting.

patch-3
Artem Pikulin 7 years ago
parent
commit
2e8942d7a5
  1. 2
      CMakeLists.txt
  2. 7
      iguana/exchanges/etomicswap/etomiccurl.c

2
CMakeLists.txt

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5.1)
cmake_minimum_required(VERSION 3.9.6)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.19.173.tar.gz"

7
iguana/exchanges/etomicswap/etomiccurl.c

@ -292,12 +292,17 @@ int32_t waitForConfirmation(char *txId)
{
EthTxReceipt receipt;
EthTxData txData;
uint8_t retries = 0;
do {
receipt = getEthTxReceipt(txId);
if (receipt.confirmations < 1) {
txData = getEthTxData(txId);
if (txData.exists == 0) {
return(-1);
retries++;
if (retries >= 10) {
printf("Have not found ETH tx %s after 10 checks, aborting\n", txId);
return (-1);
}
}
} else {
break;

Loading…
Cancel
Save