Error code separation

This commit is contained in:
jl777
2019-07-08 07:27:52 -11:00
parent 5685c7f49c
commit 19f55b42ab
2 changed files with 7 additions and 8 deletions

View File

@@ -16,11 +16,10 @@
// todo:
// pubkeys extract
// headers "sync"
// headers "sync" make sure it connects to prior blocks to notarization. use getinfo hdrht to get missing hdrs
// 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 no files are updated (this is to allow nSPV=1 and later nSPV=0 without affecting database)

View File

@@ -601,9 +601,9 @@ int32_t NSPV_gettransaction(int32_t skipvalidation,int32_t vout,uint256 txid,int
return(-1);
}
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 )
retval = -21;
retval = -2001;
else if ( skipvalidation == 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 )
{
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 = -24;
} else retval = -2002;
} else retval = -2004;
}
return(retval);
}