diff --git a/src/hush_nSPV_fullnode.h b/src/hush_nSPV_fullnode.h index 5124bed35..d93deb686 100644 --- a/src/hush_nSPV_fullnode.h +++ b/src/hush_nSPV_fullnode.h @@ -124,19 +124,8 @@ int32_t NSPV_setequihdr(struct NSPV_equihdr *hdr,int32_t height) hdr->nTime = pindex->nTime; hdr->nBits = pindex->nBits; hdr->nNonce = pindex->nNonce; - auto header = pindex->GetBlockHeader(); - // if (pindex->HasSolution()) { - // header.nSolution = nSolution; - // } else { - CDiskBlockIndex dbindex; - if (!pblocktree->ReadDiskBlockIndex(pindex->GetBlockHash(), dbindex)) { - LogPrintf("%s: Failed to read index entry", __func__); - throw std::runtime_error("Failed to read index entry"); - } - header.nSolution = dbindex.GetSolution(); - // } - memcpy(hdr->nSolution,&header.nSolution[0],sizeof(hdr->nSolution)); + memcpy(hdr->nSolution,&pindex->GetBlockHeader().nSolution[0],sizeof(hdr->nSolution)); return(sizeof(*hdr)); } return(-1);