Browse Source

Test

etomic
jl777 7 years ago
parent
commit
6231df35f2
  1. 8
      iguana/exchanges/LP_instantdex.c

8
iguana/exchanges/LP_instantdex.c

@ -303,7 +303,7 @@ int64_t LP_instantdex_credit(int32_t dispflag,char *coinaddr,int64_t satoshis,in
if ( coin != 0 )
{
timestamp = LP_FIRSTWEEKTIME + weeki*LP_WEEKMULT;
if ( time(NULL) < timestamp-60*3600 && (ap= LP_address(coin,coinaddr)) != 0 )
if ( (ap= LP_address(coin,coinaddr)) != 0 && time(NULL) < timestamp-60*3600 )
{
ap->instantdex_credits += satoshis;
ap->didinstantdex = 1;
@ -312,7 +312,7 @@ int64_t LP_instantdex_credit(int32_t dispflag,char *coinaddr,int64_t satoshis,in
if ( dispflag != 0 )
printf("InstantDEX credit.(%s) %.8f weeki.%d (%s) -> sum %.8f\n",coinaddr,dstr(satoshis),weeki,p2shaddr,dstr(ap->instantdex_credits));
return(satoshis);
}
} else printf("null ap.%p or expired %ld\n",ap,time(NULL) - (timestamp-60*3600));
}
return(0);
}
@ -342,8 +342,8 @@ int64_t LP_instantdex_creditcalc(struct iguana_info *coin,int32_t dispflag,bits2
{
free_json(txobj);
LP_instantdex_credit(dispflag,destaddr,satoshis,weeki,p2shaddr,txid);
}
}
} else printf("already spent\n");
} else printf("error getting p2shaddr.(%s)\n",p2shaddr);
}
}
free_json(txjson);

Loading…
Cancel
Save