jl777 7 years ago
parent
commit
e3372f3288
  1. 2
      iguana/exchanges/LP_ordermatch.c
  2. 9
      iguana/exchanges/LP_rpc.c

2
iguana/exchanges/LP_ordermatch.c

@ -962,7 +962,7 @@ struct LP_utxoinfo *LP_buyutxo(struct LP_utxoinfo *bestutxo,double *ordermatchpr
printf("ordermatch %.8f %.8f %.8f txfees (%.8f %.8f)\n",price,dstr(*bestsatoshisp),dstr(*bestdestsatoshisp),dstr(txfee),dstr(desttxfee)); printf("ordermatch %.8f %.8f %.8f txfees (%.8f %.8f)\n",price,dstr(*bestsatoshisp),dstr(*bestdestsatoshisp),dstr(txfee),dstr(desttxfee));
break; break;
} }
} else printf("no unspents %s\n",bits256_str(str,pubkey)); } else printf("no unspents %s %s %s\n",base,coinaddr,bits256_str(str,pubkey));
} else printf("self trading or blacklisted peer\n"); } else printf("self trading or blacklisted peer\n");
} }
else else

9
iguana/exchanges/LP_rpc.c

@ -486,7 +486,10 @@ int32_t LP_listunspent_issue(char *symbol,char *coinaddr)
if ( (coin= LP_coinfind(symbol)) != 0 ) if ( (coin= LP_coinfind(symbol)) != 0 )
{ {
if ( coin->electrum != 0 ) if ( coin->electrum != 0 )
retjson = electrum_address_listunspent(symbol,coin->electrum,&retjson,coinaddr); {
if ( (retjson= electrum_address_listunspent(symbol,coin->electrum,&retjson,coinaddr)) != 0 )
n = cJSON_GetArraySize(retjson);
}
else else
{ {
if ( strcmp(coin->smartaddr,coinaddr) == 0 ) if ( strcmp(coin->smartaddr,coinaddr) == 0 )
@ -503,7 +506,9 @@ int32_t LP_listunspent_issue(char *symbol,char *coinaddr)
{ {
n = cJSON_GetArraySize(retjson); n = cJSON_GetArraySize(retjson);
if ( electrum_process_array(coin,0,coinaddr,retjson) != 0 ) if ( electrum_process_array(coin,0,coinaddr,retjson) != 0 )
LP_postutxos(symbol,coinaddr); // might be good to not saturate {
//LP_postutxos(symbol,coinaddr); // might be good to not saturate
}
} }
} }
//printf("issue listunspent %s (%s)\n",coinaddr,jprint(retjson,0)); //printf("issue listunspent %s (%s)\n",coinaddr,jprint(retjson,0));

Loading…
Cancel
Save