|
|
@ -518,6 +518,9 @@ int64_t LP_instantdex_proofcheck(char *symbol,char *coinaddr,cJSON *proof,int32_ |
|
|
|
//printf("proofcheck addrtype.%d (%s) -> %s\n",addrtype,coinaddr,othersmartaddr);
|
|
|
|
if ((ap= LP_address(coin,othersmartaddr)) != 0 ) |
|
|
|
{ |
|
|
|
if ( time(NULL) < ap->instantdextime+300 ) |
|
|
|
return(ap->instantdex_credits); |
|
|
|
ap->instantdextime = (uint32_t)time(NULL); |
|
|
|
ap->instantdex_credits = 0; |
|
|
|
for (i=0; i<num; i++) |
|
|
|
{ |
|
|
@ -533,6 +536,7 @@ int64_t LP_instantdex_proofcheck(char *symbol,char *coinaddr,cJSON *proof,int32_ |
|
|
|
} |
|
|
|
credits = ap->instantdex_credits; |
|
|
|
ap->didinstantdex = 1; |
|
|
|
ap->instantdextime = (uint32_t)time(NULL); |
|
|
|
if ( 0 && ap->instantdex_credits > 0 ) |
|
|
|
printf("validated instantdex %s.[%d] proof.(%s) credits %.8f\n",othersmartaddr,num,jprint(proof,0),dstr(ap->instantdex_credits)); |
|
|
|
} //else printf("cant find ap.%p or already did %d %.8f\n",ap,ap!=0?ap->didinstantdex:-1,ap!=0?dstr(ap->instantdex_credits):-1);
|
|
|
|