|
|
@ -254,17 +254,17 @@ cJSON *LP_gettxout(char *symbol,char *coinaddr,bits256 txid,int32_t vout) |
|
|
|
return(cJSON_Parse("{\"error\":\"no coin\"}")); |
|
|
|
if ( bits256_nonz(txid) == 0 ) |
|
|
|
return(cJSON_Parse("{\"error\":\"null txid\"}")); |
|
|
|
if ( (tx= LP_transactionfind(coin,txid)) != 0 && vout < tx->numvouts ) |
|
|
|
if ( coin->electrum == 0 ) |
|
|
|
{ |
|
|
|
if ( tx->outpoints[vout].spendheight > 0 ) |
|
|
|
if ( (tx= LP_transactionfind(coin,txid)) != 0 && vout < tx->numvouts ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"LP_gettxout (%s) tx->outpoints[vout].spendheight > 0\n",coinaddr); |
|
|
|
return(0); |
|
|
|
if ( tx->outpoints[vout].spendheight > 0 ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"LP_gettxout (%s) tx->outpoints[vout].spendheight > 0\n",coinaddr); |
|
|
|
return(0); |
|
|
|
} |
|
|
|
//return(LP_gettxout_json(txid,vout,tx->height,tx->outpoints[vout].coinaddr,tx->outpoints[vout].value));
|
|
|
|
} |
|
|
|
//return(LP_gettxout_json(txid,vout,tx->height,tx->outpoints[vout].coinaddr,tx->outpoints[vout].value));
|
|
|
|
} |
|
|
|
if ( coin->electrum == 0 ) |
|
|
|
{ |
|
|
|
sprintf(buf,"[\"%s\", %d, true]",bits256_str(str,txid),vout); |
|
|
|
return(bitcoin_json(coin,"gettxout",buf)); |
|
|
|
} |
|
|
|