From 68c3a42eac985c97233a12945c0c724460e30f3a Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Thu, 14 Jun 2018 15:15:02 +0700 Subject: [PATCH] #73 Add more console logs when eth tx sends fails. --- iguana/exchanges/etomicswap/etomiccurl.c | 1 + iguana/exchanges/etomicswap/etomiclib.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/iguana/exchanges/etomicswap/etomiccurl.c b/iguana/exchanges/etomicswap/etomiccurl.c index 84985f828..c6a493f33 100644 --- a/iguana/exchanges/etomicswap/etomiccurl.c +++ b/iguana/exchanges/etomicswap/etomiccurl.c @@ -320,6 +320,7 @@ uint64_t getGasPriceFromStation(uint8_t defaultOnErr) cJSON *resultJson = cJSON_Parse(s.ptr); free(s.ptr); if (resultJson == NULL) { + printf("Could not parse gas station response!\n"); return result; } diff --git a/iguana/exchanges/etomicswap/etomiclib.cpp b/iguana/exchanges/etomicswap/etomiclib.cpp index ee0e03d6f..b1bcbe7c1 100644 --- a/iguana/exchanges/etomicswap/etomiclib.cpp +++ b/iguana/exchanges/etomicswap/etomiclib.cpp @@ -676,6 +676,7 @@ char *sendEth(char *to, char *amount, char *privKey, uint8_t waitConfirm, int64_ } else { tx.gasPrice = getGasPriceFromStation(defaultGasOnErr) * boost::multiprecision::pow(u256(10), 9); if (tx.gasPrice == 0 && !defaultGasOnErr) { + printf("Could not get gas price from station!\n"); unlock_send_tx_mutex(); return NULL; } @@ -764,6 +765,7 @@ char *sendErc20( } else { tx.gasPrice = getGasPriceFromStation(defaultGasOnErr) * boost::multiprecision::pow(u256(10), 9); if (tx.gasPrice == 0 && !defaultGasOnErr) { + printf("Could not get gas price from station!\n"); unlock_send_tx_mutex(); return NULL; }