diff --git a/iguana/exchanges/LP_quotes.c b/iguana/exchanges/LP_quotes.c index c409a5760..2d6263628 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.srccoin,Q.txid,Q.vout,Q.value,Q.txid2,Q.vout2,Q.va.ue2) != 0 ) + if ( LP_iseligible(Q.srccoin,Q.txid,Q.vout,Q.satoshis,Q.txid2,Q.vout2) != 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 b74f0a809..5c5a0b4a5 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -145,15 +145,15 @@ char *LP_spentcheck(cJSON *argjson) } else return(clonestr("{\"error\":\"cant find txid to check spent status\"}")); } -int32_t LP_iseligible(char *coin,bits256 txid,int32_t vout,uint64_t value,bits256 txid2,int32_t vout2,uint64_t value2) +int32_t LP_iseligible(char *coin,bits256 txid,int32_t vout,uint64_t satoshis,bits256 txid2,int32_t vout2) { - uint64_t val,val2; - if ( (val= LP_txvalue(coin,txid,vout)) != value ) + uint64_t val,val2; + if ( (val= LP_txvalue(coin,txid,vout)) < satoshis ) { - if ( (val2= LP_txvalue(coin,txid2,vout2)) != value2 ) + if ( (val2= LP_txvalue(coin,txid2,vout2)) < LP_DEPOSITSATOSHIS(satoshis) ) return(1); - else printf("mismatched %s txid value2 %.8f vs %.8f\n",coin,dstr(val2),dstr(value2)); - } else printf("mismatched %s txid value %.8f vs %.8f\n",coin,dstr(val),dstr(value)); + else printf("mismatched %s txid value2 %.8f < %.8f\n",coin,dstr(val2),dstr(LP_DEPOSITSATOSHIS(satoshis))); + } else printf("mismatched %s txid value %.8f < %.8f\n",coin,dstr(val),dstr(satoshis)); return(0); }