Error code separation
This commit is contained in:
@@ -16,11 +16,10 @@
|
|||||||
|
|
||||||
// todo:
|
// todo:
|
||||||
|
|
||||||
// pubkeys extract
|
// headers "sync" make sure it connects to prior blocks to notarization. use getinfo hdrht to get missing hdrs
|
||||||
// headers "sync"
|
|
||||||
// interest calculations are currently just using what is returned, it should calculate it from scratch
|
// interest calculations are currently just using what is returned, it should calculate it from scratch
|
||||||
|
|
||||||
// need to validate incoming data and update only if it is valid and more recent
|
|
||||||
// make sure to sanity check all vector lengths on receipt
|
// make sure to sanity check all vector lengths on receipt
|
||||||
// make sure no files are updated (this is to allow nSPV=1 and later nSPV=0 without affecting database)
|
// make sure no files are updated (this is to allow nSPV=1 and later nSPV=0 without affecting database)
|
||||||
|
|
||||||
|
|||||||
@@ -601,9 +601,9 @@ int32_t NSPV_gettransaction(int32_t skipvalidation,int32_t vout,uint256 txid,int
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
else if ( NSPV_txextract(tx,NSPV_txproofresult.tx,NSPV_txproofresult.txlen) < 0 || NSPV_txproofresult.txlen <= 0 )
|
else if ( NSPV_txextract(tx,NSPV_txproofresult.tx,NSPV_txproofresult.txlen) < 0 || NSPV_txproofresult.txlen <= 0 )
|
||||||
retval = -20;
|
retval = -2000;
|
||||||
else if ( skipvalidation == 0 && NSPV_txproofresult.unspentvalue <= 0 )
|
else if ( skipvalidation == 0 && NSPV_txproofresult.unspentvalue <= 0 )
|
||||||
retval = -21;
|
retval = -2001;
|
||||||
else if ( skipvalidation == 0 )
|
else if ( skipvalidation == 0 )
|
||||||
{
|
{
|
||||||
if ( NSPV_txproofresult.txprooflen > 0 )
|
if ( NSPV_txproofresult.txprooflen > 0 )
|
||||||
@@ -633,11 +633,11 @@ int32_t NSPV_gettransaction(int32_t skipvalidation,int32_t vout,uint256 txid,int
|
|||||||
if ( proofroot != NSPV_ntzsproofresult.common.hdrs[offset].hashMerkleRoot )
|
if ( proofroot != NSPV_ntzsproofresult.common.hdrs[offset].hashMerkleRoot )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"prooflen.%d proofroot.%s vs %s\n",NSPV_txproofresult.txprooflen,proofroot.GetHex().c_str(),NSPV_ntzsproofresult.common.hdrs[offset].hashMerkleRoot.GetHex().c_str());
|
fprintf(stderr,"prooflen.%d proofroot.%s vs %s\n",NSPV_txproofresult.txprooflen,proofroot.GetHex().c_str(),NSPV_ntzsproofresult.common.hdrs[offset].hashMerkleRoot.GetHex().c_str());
|
||||||
retval = -23;
|
retval = -2003;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else retval = -22;
|
} else retval = -2002;
|
||||||
} else retval = -24;
|
} else retval = -2004;
|
||||||
}
|
}
|
||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user