Pull in upstream npsv updates from jl777/komodo@1f874d46c5

This commit is contained in:
Duke Leto
2019-12-08 20:37:59 -05:00
parent 32258ee7ed
commit 10be224558
7 changed files with 461 additions and 3 deletions

View File

@@ -431,6 +431,20 @@ void NSPV_broadcast_purge(struct NSPV_broadcastresp *ptr)
memset(ptr,0,sizeof(*ptr));
}
int32_t NSPV_rwremoterpcresp(int32_t rwflag,uint8_t *serialized,struct NSPV_remoterpcresp *ptr, int32_t slen)
{
int32_t len = 0;
len+=iguana_rwbuf(rwflag,&serialized[len],sizeof(ptr->method),(uint8_t*)ptr->method);
len+=iguana_rwbuf(rwflag,&serialized[len],slen-len,(uint8_t*)ptr->json);
return(len);
}
void NSPV_remoterpc_purge(struct NSPV_remoterpcresp *ptr)
{
if ( ptr != 0 )
memset(ptr,0,sizeof(*ptr));
}
// useful utility functions
uint256 NSPV_doublesha256(uint8_t *data,int32_t datalen)