Test
This commit is contained in:
@@ -568,7 +568,7 @@ int32_t NSPV_getntzsproofresp(struct NSPV_ntzsproofresp *ptr,int32_t prevht,int3
|
||||
ptr->nexttxid = NSPV_getnotarization_txid(&ptr->nexttxidht,nextht);
|
||||
ptr->nextntz = NSPV_getrawtx(hashBlock,&ptr->nextlen,ptr->nexttxid);
|
||||
fprintf(stderr,"prevlen.%d nextlen.%d size %ld -> %ld\n",ptr->prevlen,ptr->nextlen,sizeof(*ptr),sizeof(*ptr) - sizeof(ptr->common.hdrs) - sizeof(ptr->prevntz) - sizeof(ptr->nextntz) + ptr->prevlen + ptr->nextlen);
|
||||
return(sizeof(*ptr) - sizeof(ptr->common.hdrs) - sizeof(ptr->prevntz) - sizeof(ptr->nextntz) + ptr->prevlen + ptr->nextlen);
|
||||
return(sizeof(*ptr) + sizeof(*ptr->common.hdrs)*ptr->common.numhdrs - sizeof(ptr->common.hdrs) - sizeof(ptr->prevntz) - sizeof(ptr->nextntz) + ptr->prevlen + ptr->nextlen);
|
||||
}
|
||||
|
||||
int32_t NSPV_getspentinfo(struct NSPV_spentinfo *ptr,uint256 txid,int32_t vout)
|
||||
@@ -671,6 +671,12 @@ void komodo_nSPVreq(CNode *pfrom,std::vector<uint8_t> request) // received a req
|
||||
struct NSPV_ntzsproofresp P; int32_t prevht,nextht;
|
||||
if ( len == 1+sizeof(prevht)+sizeof(nextht) )
|
||||
{
|
||||
{
|
||||
int32_t z;
|
||||
for (z=0; z<9; z++)
|
||||
fprintf(stderr,"%02x",request[z]);
|
||||
fprintf(stderr," -> prevht.%d nextht.%d\n",prevht,nextht);
|
||||
}
|
||||
iguana_rwnum(0,&request[1],sizeof(prevht),&prevht);
|
||||
iguana_rwnum(0,&request[1+sizeof(prevht)],sizeof(nextht),&nextht);
|
||||
if ( prevht != 0 && nextht != 0 && nextht >= prevht )
|
||||
@@ -1005,6 +1011,13 @@ UniValue NSPV_hdrsproof(int32_t prevheight,int32_t nextheight)
|
||||
msg[len++] = NSPV_NTZSPROOF;
|
||||
len += iguana_rwnum(1,&msg[len],sizeof(prevheight),&prevheight);
|
||||
len += iguana_rwnum(1,&msg[len],sizeof(nextheight),&nextheight);
|
||||
{
|
||||
int32_t z;
|
||||
for (z=0; z<9; z++)
|
||||
fprintf(stderr,"%02x",msg[z]);
|
||||
fprintf(stderr," -> prevht.%d nextht.%d\n",prevht,nextht);
|
||||
}
|
||||
|
||||
if ( NSPV_req(0,msg,len,NODE_NSPV,msg[0]>>1) != 0 )
|
||||
{
|
||||
for (i=0; i<10; i++)
|
||||
|
||||
Reference in New Issue
Block a user