From 640cb30c56af4d4cd02d1ca859ba5512a155f816 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 7 Jul 2019 21:37:42 -1100 Subject: [PATCH] Prints --- src/komodo_nSPV.h | 1 + src/komodo_nSPV_fullnode.h | 3 +++ src/wallet/rpcdump.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index 4b4b3510a..9ffd67030 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -229,6 +229,7 @@ int32_t NSPV_rwinforesp(int32_t rwflag,uint8_t *serialized,struct NSPV_inforesp len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->height),&ptr->height); len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->hdrheight),&ptr->hdrheight); len += NSPV_rwequihdr(rwflag,&serialized[len],&ptr->H); + fprintf(stderr,"hdr rwlen.%d\n",len); return(len); } diff --git a/src/komodo_nSPV_fullnode.h b/src/komodo_nSPV_fullnode.h index 8c213e370..26f0f44dc 100644 --- a/src/komodo_nSPV_fullnode.h +++ b/src/komodo_nSPV_fullnode.h @@ -333,11 +333,14 @@ void komodo_nSPVreq(CNode *pfrom,std::vector request) // received a req if ( timestamp > pfrom->prevtimes[ind] ) { struct NSPV_inforesp I; + iguana_rwnum(0,&request[1],sizeof(height),&height); + fprintf(stderr,"request height.%d\n",height); memset(&I,0,sizeof(I)); if ( (slen= NSPV_getinfo(&I)) > 0 ) { response.resize(1 + slen); response[0] = NSPV_INFORESP; + fprintf(stderr,"slen.%d\n",slen); if ( NSPV_rwinforesp(1,&response[1],&I) == slen ) { pfrom->PushMessage("nSPV",response); diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 0aac30799..071e3d8a7 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -990,7 +990,7 @@ UniValue nspv_getinfo(const UniValue& params, bool fHelp) int32_t reqht = 0; if ( fHelp || params.size() > 1 ) throw runtime_error("nspv_getinfo [hdrheight]\n"); - if ( params.size() == 0 ) + if ( params.size() == 1 ) reqht = atoi((char *)params[0].get_str().c_str()); return(NSPV_getinfo_req(reqht)); }