Redo block hash
This commit is contained in:
@@ -387,9 +387,16 @@ uint256 NSPV_doublesha256(uint8_t *data,int32_t datalen)
|
|||||||
|
|
||||||
uint256 NSPV_hdrhash(struct NSPV_equihdr *hdr)
|
uint256 NSPV_hdrhash(struct NSPV_equihdr *hdr)
|
||||||
{
|
{
|
||||||
uint8_t data[sizeof(*hdr)]; uint16_t hdrsize = sizeof(*hdr);
|
CBlockIndex block;
|
||||||
iguana_rwequihdrvec(1,data,&hdrsize,&hdr);
|
block.nVersion = hdr->nVersion;
|
||||||
return(NSPV_doublesha256(data,sizeof(*hdr)));
|
block.hashPrevBlock = hdr->hashPrevBlock;
|
||||||
|
block.hashMerkleRoot = hdr->hashMerkleRoot;
|
||||||
|
block.hashFinalSaplingRoot = hdr->hashFinalSaplingRoot;
|
||||||
|
block.nTime = hdr->nTime;
|
||||||
|
block.nBits = hdr->nBits;
|
||||||
|
block.nNonce = hdr->nNonce;
|
||||||
|
memcpy(block.nSolution,hdr->nSolution,sizeof(hdr->nSolution));
|
||||||
|
return(block.GetHash());
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t NSPV_txextract(CTransaction &tx,uint8_t *data,int32_t datalen)
|
int32_t NSPV_txextract(CTransaction &tx,uint8_t *data,int32_t datalen)
|
||||||
|
|||||||
Reference in New Issue
Block a user