Check for spent utxo
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
// todo:
|
||||
// make sure no files are updated (this is to allow nSPV=1 and later nSPV=0 without affecting database)
|
||||
|
||||
// determine if it makes sense to be scanning mempool for the utxo/spentinfo requests, maybe can add isspent flag to txproof, or just use getspentinfo if broadcast fails
|
||||
|
||||
// pubkeys extract
|
||||
// headers "sync"
|
||||
// interest calculations are currently just using what is returned, it should calculate it from scratch
|
||||
|
||||
@@ -58,7 +58,7 @@ int32_t NSPV_gettransaction(int32_t vout,uint256 txid,int32_t height,CTransactio
|
||||
{
|
||||
int32_t offset,retval = 0;
|
||||
NSPV_txproof(vout,txid,height);
|
||||
if ( NSPV_txproofresult.txid != txid )
|
||||
if ( NSPV_txproofresult.txid != txid || NSPV_txproofresult.unspentsatoshis <= 0 )
|
||||
return(-1);
|
||||
else if ( NSPV_txextract(tx,NSPV_txproofresult.tx,NSPV_txproofresult.txlen) < 0 || NSPV_txproofresult.txlen <= 0 )
|
||||
retval = -20;
|
||||
|
||||
Reference in New Issue
Block a user