diff --git a/iguana/exchanges/LP_quotes.c b/iguana/exchanges/LP_quotes.c index a6116eb47..c409a5760 100644 --- a/iguana/exchanges/LP_quotes.c +++ b/iguana/exchanges/LP_quotes.c @@ -222,7 +222,7 @@ cJSON *LP_tradecandidates(struct LP_utxoinfo *myutxo,char *base) safecopy(coinstr,jstr(item,"base"),sizeof(coinstr)); if ( strcmp(coinstr,base) == 0 ) { - if ( LP_iseligible(Q.txid,Q.vout) != 0 ) + if ( LP_iseligible(Q.srccoin,Q.txid,Q.vout,Q.value,Q.txid2,Q.vout2,Q.va.ue2) != 0 ) { if ( LP_arrayfind(retarray,Q.txid,Q.vout) < 0 ) jaddi(retarray,jduplicate(item)); diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index 34e344fc3..6cf96495c 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -145,17 +145,17 @@ char *LP_spentcheck(cJSON *argjson) } else return(clonestr("{\"error\":\"cant find txid to check spent status\"}")); } -int32_t LP_iseligible(bits256 txid,int32_t vout) +int32_t LP_iseligible(char *coin,bits256 txid,int32_t vout,uint64_t value,bits256 txid2,int32_t vout2,uint64_t value2) { - struct LP_utxoinfo *utxo; uint64_t value; char str[65]; + struct LP_utxoinfo *utxo; uint64_t val,val2; char str[65]; if ( (utxo= LP_utxofind(txid,vout)) != 0 ) { - if ( (value= LP_txvalue(utxo->coin,utxo->txid,utxo->vout)) == utxo->value ) + if ( (val= LP_txvalue(coin,txid,vout)) != value ) { - if ( LP_txvalue(utxo->coin,utxo->txid2,utxo->vout2) == utxo->value2 ) + if ( (val2= LP_txvalue(coin,txid2,vout2)) != value2 ) return(1); - else printf("mismatched txid value2 %.8f vs %.8f\n",dstr(value),dstr(utxo->value2)); - } else printf("mismatched txid value %.8f vs %.8f\n",dstr(value),dstr(utxo->value)); + else printf("mismatched txid value2 %.8f vs %.8f\n",dstr(val2),dstr(value2)); + } else printf("mismatched txid value %.8f vs %.8f\n",dstr(val),dstr(value)); } else printf("cant find (%s/v%d)\n",bits256_str(str,txid),vout); return(0); }