Browse Source

Prints

warmup
jl777 5 years ago
parent
commit
640cb30c56
  1. 1
      src/komodo_nSPV.h
  2. 3
      src/komodo_nSPV_fullnode.h
  3. 2
      src/wallet/rpcdump.cpp

1
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);
}

3
src/komodo_nSPV_fullnode.h

@ -333,11 +333,14 @@ void komodo_nSPVreq(CNode *pfrom,std::vector<uint8_t> 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);

2
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));
}

Loading…
Cancel
Save