diff --git a/iguana/exchanges/LP_remember.c b/iguana/exchanges/LP_remember.c index b8597cbd4..a5ccda267 100644 --- a/iguana/exchanges/LP_remember.c +++ b/iguana/exchanges/LP_remember.c @@ -935,6 +935,16 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti jaddnum(retjson,"quoteid",quoteid); return(retjson); } + if ( alice->lastscanht < alice->longestchain+1 ) + { + printf("need to scan %s first\n",alice->symbol); + cJSON *retjson = cJSON_CreateObject(); + jaddstr(retjson,"error","need to scan coin first"); + jaddstr(retjson,"coin",alice->symbol); + jaddnum(retjson,"requestid",requestid); + jaddnum(retjson,"quoteid",quoteid); + return(retjson); + } } if ( (bob= LP_coinfind(rswap.bobcoin)) != 0 ) { @@ -959,6 +969,16 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti jaddnum(retjson,"quoteid",quoteid); return(retjson); } + if ( bob->lastscanht < bob->longestchain+1 ) + { + printf("need to scan %s first\n",bob->symbol); + cJSON *retjson = cJSON_CreateObject(); + jaddstr(retjson,"error","need to scan coin first"); + jaddstr(retjson,"coin",bob->symbol); + jaddnum(retjson,"requestid",requestid); + jaddnum(retjson,"quoteid",quoteid); + return(retjson); + } } if ( (alice= LP_coinfind(rswap.alicecoin)) != 0 ) {