Browse Source

Test

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

2
iguana/exchanges/LP_instantdex.c

@ -307,7 +307,7 @@ void LP_instantdex_proofcheck(char *coinaddr,cJSON *proof,int32_t num)
for (i=0; i<num; i++)
LP_instantdex_creditcalc(coin,1,jbits256i(proof,i),othersmartaddr);
ap->didinstantdex = 1;
if ( ap->instantdex_credits > 0 )
//if ( 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);
}

2
iguana/exchanges/LP_ordermatch.c

@ -1239,7 +1239,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
LP_bob_competition(&counter,aliceid,qprice,1000);
if ( bits256_cmp(G.LP_mypub25519,Q.srchash) == 0 && bits256_cmp(G.LP_mypub25519,Q.desthash) != 0 )
{
//printf("CONNECT.(%s)\n",jprint(argjson,0));
printf("CONNECT.(%s)\n",jprint(argjson,0));
if ( (proof= jarray(&num,argjson,"proof")) != 0 && num > 0 )
LP_instantdex_proofcheck(Q.destaddr,proof,num);
if ( Qtrades == 0 )

Loading…
Cancel
Save