Merge branch 'jl777' into nSPV
This commit is contained in:
@@ -255,6 +255,7 @@ int32_t NSPV_rwntz(int32_t rwflag,uint8_t *serialized,struct NSPV_ntz *ptr)
|
|||||||
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(ptr->othertxid),(uint8_t *)&ptr->othertxid);
|
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(ptr->othertxid),(uint8_t *)&ptr->othertxid);
|
||||||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->height),&ptr->height);
|
len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->height),&ptr->height);
|
||||||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->txidheight),&ptr->txidheight);
|
len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->txidheight),&ptr->txidheight);
|
||||||
|
len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->timestamp),&ptr->timestamp);
|
||||||
return(len);
|
return(len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ struct NSPV_ntz
|
|||||||
{
|
{
|
||||||
uint256 blockhash,txid,othertxid;
|
uint256 blockhash,txid,othertxid;
|
||||||
int32_t height,txidheight;
|
int32_t height,txidheight;
|
||||||
|
uint32_t timestamp;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NSPV_ntzsresp
|
struct NSPV_ntzsresp
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ int32_t NSPV_setequihdr(struct NSPV_equihdr *hdr,int32_t height)
|
|||||||
|
|
||||||
int32_t NSPV_getinfo(struct NSPV_inforesp *ptr,int32_t reqheight)
|
int32_t NSPV_getinfo(struct NSPV_inforesp *ptr,int32_t reqheight)
|
||||||
{
|
{
|
||||||
int32_t prevMoMheight,len = 0; CBlockIndex *pindex; struct NSPV_ntzsresp pair;
|
int32_t prevMoMheight,len = 0; CBlockIndex *pindex, *pindex2; struct NSPV_ntzsresp pair;
|
||||||
if ( (pindex= chainActive.LastTip()) != 0 )
|
if ( (pindex= chainActive.LastTip()) != 0 )
|
||||||
{
|
{
|
||||||
ptr->height = pindex->GetHeight();
|
ptr->height = pindex->GetHeight();
|
||||||
@@ -130,6 +130,9 @@ int32_t NSPV_getinfo(struct NSPV_inforesp *ptr,int32_t reqheight)
|
|||||||
if ( NSPV_getntzsresp(&pair,ptr->height-1) < 0 )
|
if ( NSPV_getntzsresp(&pair,ptr->height-1) < 0 )
|
||||||
return(-1);
|
return(-1);
|
||||||
ptr->notarization = pair.prevntz;
|
ptr->notarization = pair.prevntz;
|
||||||
|
if ( (pindex2= komodo_chainactive(ptr->notarization.txidheight)) != 0 )
|
||||||
|
ptr->notarization.timestamp = pindex->nTime;
|
||||||
|
fprintf(stderr, "timestamp.%i\n", ptr->notarization.timestamp );
|
||||||
if ( reqheight == 0 )
|
if ( reqheight == 0 )
|
||||||
reqheight = ptr->height;
|
reqheight = ptr->height;
|
||||||
ptr->hdrheight = reqheight;
|
ptr->hdrheight = reqheight;
|
||||||
|
|||||||
Reference in New Issue
Block a user