diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index f0e59e8cb..9c577512d 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -16,11 +16,11 @@ // todo: +// CC signing + // 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 -// CC signing // 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) // bug: under load, fullnode was returning all 0 nServices @@ -118,6 +118,16 @@ int32_t NSPV_rwutxosresp(int32_t rwflag,uint8_t *serialized,struct NSPV_utxosres return(len); } +void NSPV_utxosresp_purge(struct NSPV_utxosresp *ptr) +{ + if ( ptr != 0 ) + { + if ( ptr->utxos != 0 ) + free(ptr->utxos); + memset(ptr,0,sizeof(*ptr)); + } +} + int32_t NSPV_rwntz(int32_t rwflag,uint8_t *serialized,struct NSPV_ntz *ptr) { int32_t len = 0; diff --git a/src/komodo_nSPV_defs.h b/src/komodo_nSPV_defs.h index c1ec60817..537a7209e 100644 --- a/src/komodo_nSPV_defs.h +++ b/src/komodo_nSPV_defs.h @@ -14,17 +14,6 @@ * * ******************************************************************************/ -// todo: - -// 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 - -// CC signing -// 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) -// bug: under load, fullnode was returning all 0 nServices - #ifndef KOMODO_NSPV_DEFSH #define KOMODO_NSPV_DEFSH