Add caching to three requests: ntzsresp, txproof, ntzsproof
This commit is contained in:
@@ -77,7 +77,7 @@ int32_t NSPV_ntzextract(struct NSPV_ntz *ptr,uint256 ntztxid,int32_t txidht,uint
|
||||
return(0);
|
||||
}
|
||||
|
||||
int32_t NSPV_getntzsresp(struct NSPV_ntzsresp *ptr,int32_t height)
|
||||
int32_t NSPV_getntzsresp(struct NSPV_ntzsresp *ptr,int32_t reqheight)
|
||||
{
|
||||
struct NSPV_ntzargs prev,next;
|
||||
if ( height < chainActive.LastTip()->GetHeight() )
|
||||
@@ -86,6 +86,7 @@ int32_t NSPV_getntzsresp(struct NSPV_ntzsresp *ptr,int32_t height)
|
||||
{
|
||||
if ( prev.ntzheight != 0 )
|
||||
{
|
||||
ptr->reqheight = reqheight;
|
||||
if ( NSPV_ntzextract(&ptr->prevntz,prev.txid,prev.txidht,prev.desttxid,prev.ntzheight) < 0 )
|
||||
return(-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user