Browse Source

Test

etomic
jl777 8 years ago
parent
commit
4c763f5590
  1. 4
      iguana/exchanges/LP_ordermatch.c
  2. 6
      iguana/exchanges/LP_utxos.c

4
iguana/exchanges/LP_ordermatch.c

@ -644,8 +644,8 @@ struct LP_utxoinfo *LP_bestutxo(double *ordermatchpricep,int64_t *bestsatoshisp,
else else
{ {
printf("ineligible.(%.8f %.8f)\n",price,dstr(butxo->S.satoshis)); printf("ineligible.(%.8f %.8f)\n",price,dstr(butxo->S.satoshis));
if ( butxo->T.spentflag == 0 ) //if ( butxo->T.spentflag == 0 )
butxo->T.spentflag = (uint32_t)time(NULL); // butxo->T.spentflag = (uint32_t)time(NULL);
} }
} }
else else

6
iguana/exchanges/LP_utxos.c

@ -471,7 +471,7 @@ char *LP_spentcheck(cJSON *argjson)
LP_mypeer->numutxos--; LP_mypeer->numutxos--;
utxo->T.spentflag = (uint32_t)time(NULL); utxo->T.spentflag = (uint32_t)time(NULL);
retval++; retval++;
//printf("indeed txid was spent\n"); printf("indeed txid was spent\n");
} }
} }
} }
@ -598,8 +598,8 @@ struct LP_utxoinfo *LP_utxoadd(int32_t iambob,int32_t mypubsock,char *symbol,bit
char str[65],str2[65],str3[65],str4[65],str5[65],str6[65]; char str[65],str2[65],str3[65],str4[65],str5[65],str6[65];
if ( utxo->T.spentflag != 0 || LP_txvalue(0,utxo->coin,utxo->payment.txid,utxo->payment.vout) < utxo->payment.value || LP_txvalue(0,utxo->coin,u.txid,u.vout) < u.value ) if ( utxo->T.spentflag != 0 || LP_txvalue(0,utxo->coin,utxo->payment.txid,utxo->payment.vout) < utxo->payment.value || LP_txvalue(0,utxo->coin,u.txid,u.vout) < u.value )
{ {
if ( utxo->T.spentflag == 0 ) //if ( utxo->T.spentflag == 0 )
utxo->T.spentflag = (uint32_t)time(NULL); // utxo->T.spentflag = (uint32_t)time(NULL);
printf("original utxo pair not valid\n"); printf("original utxo pair not valid\n");
if ( dispflag != 0 ) if ( dispflag != 0 )
printf("error on subsequent utxo iambob.%d %.8f %.8f add.(%s %s) when.(%s %s) %d %d %d %d %d %d %d %d %d %d %d pubkeys.(%s vs %s)\n",iambob,dstr(val),dstr(val2),bits256_str(str,txid),bits256_str(str2,txid2),bits256_str(str3,utxo->payment.txid),bits256_str(str4,utxo->deposit.txid),bits256_cmp(txid,utxo->payment.txid) != 0,bits256_cmp(txid2,u.txid) != 0,vout != utxo->payment.vout,tmpsatoshis != utxo->S.satoshis,vout2 != u.vout,value2 != u.value,strcmp(symbol,utxo->coin) != 0,strcmp(spendscript,utxo->spendscript) != 0,strcmp(coinaddr,utxo->coinaddr) != 0,bits256_cmp(pubkey,utxo->pubkey) != 0,value != utxo->payment.value,bits256_str(str5,pubkey),bits256_str(str6,utxo->pubkey)); printf("error on subsequent utxo iambob.%d %.8f %.8f add.(%s %s) when.(%s %s) %d %d %d %d %d %d %d %d %d %d %d pubkeys.(%s vs %s)\n",iambob,dstr(val),dstr(val2),bits256_str(str,txid),bits256_str(str2,txid2),bits256_str(str3,utxo->payment.txid),bits256_str(str4,utxo->deposit.txid),bits256_cmp(txid,utxo->payment.txid) != 0,bits256_cmp(txid2,u.txid) != 0,vout != utxo->payment.vout,tmpsatoshis != utxo->S.satoshis,vout2 != u.vout,value2 != u.value,strcmp(symbol,utxo->coin) != 0,strcmp(spendscript,utxo->spendscript) != 0,strcmp(coinaddr,utxo->coinaddr) != 0,bits256_cmp(pubkey,utxo->pubkey) != 0,value != utxo->payment.value,bits256_str(str5,pubkey),bits256_str(str6,utxo->pubkey));

Loading…
Cancel
Save