jl777 7 years ago
parent
commit
719df185e0
  1. 20
      iguana/exchanges/LP_remember.c

20
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); jaddnum(retjson,"quoteid",quoteid);
return(retjson); 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 ) 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); jaddnum(retjson,"quoteid",quoteid);
return(retjson); 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 ) if ( (alice= LP_coinfind(rswap.alicecoin)) != 0 )
{ {

Loading…
Cancel
Save