Browse Source

Test

etomic
jl777 7 years ago
parent
commit
731b236252
  1. 1
      iguana/exchanges/LP_instantdex.c
  2. 4
      iguana/exchanges/LP_ordermatch.c

1
iguana/exchanges/LP_instantdex.c

@ -249,6 +249,7 @@ int64_t LP_instantdex_credit(int32_t dispflag,char *coinaddr,int64_t satoshis,in
if ( time(NULL) < timestamp-60*3600 && (ap= LP_address(coin,coinaddr)) != 0 )
{
ap->instantdex_credits += satoshis;
ap->didinstantdex = 1;
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);

4
iguana/exchanges/LP_ordermatch.c

@ -1179,8 +1179,6 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
}
if ( bits256_cmp(G.LP_mypub25519,Q.desthash) == 0 && bits256_cmp(G.LP_mypub25519,Q.srchash) != 0 )
{
if ( (proof= jarray(&num,argjson,"proof")) != 0 && num > 0 )
LP_instantdex_proofcheck(Q.coinaddr,proof,num);
if ( Qtrades == 0 )
{
if ( Q.quotetime > time(NULL)-20 && LP_alice_eligible(Q.quotetime) > 0 )
@ -1197,6 +1195,8 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
bestprice = LP_bob_competition(&counter,aliceid,qprice,1000);
if ( bits256_cmp(G.LP_mypub25519,Q.desthash) == 0 && bits256_cmp(G.LP_mypub25519,Q.srchash) != 0 )
{
if ( (proof= jarray(&num,argjson,"proof")) != 0 && num > 0 )
LP_instantdex_proofcheck(Q.coinaddr,proof,num);
if ( Qtrades == 0 )
LP_trades_gotconnected(ctx,&Q,&Q2,jstr(argjson,"pair"));
else LP_tradecommandQ(&Q,jstr(argjson,"pair"),LP_CONNECTED);

Loading…
Cancel
Save