Fix missing hashFinalSaplingRoot in block header

This commit is contained in:
Duke
2023-06-13 16:21:25 -04:00
parent 2525dc6734
commit e993acb2f0
2 changed files with 3 additions and 5 deletions

View File

@@ -52,8 +52,7 @@ CBlockHeader CBlockIndex::GetBlockHeader() const
header.hashPrevBlock = pprev->GetBlockHash();
}
header.hashMerkleRoot = hashMerkleRoot;
// Hush does not have this, maybe some day
// header.hashBlockCommitments = hashBlockCommitments;
header.hashFinalSaplingRoot = hashFinalsaplingRoot;
header.nTime = nTime;
header.nBits = nBits;
header.nNonce = nNonce;
@@ -62,7 +61,7 @@ CBlockHeader CBlockIndex::GetBlockHeader() const
} else {
CDiskBlockIndex dbindex;
if (!pblocktree->ReadDiskBlockIndex(GetBlockHash(), dbindex)) {
LogPrintf("%s: Failed to read index entry", __func__);
LogPrintf("%s: ReadDiskBlockIndex failed to read index entry of block %s", __func__, GetBlockHash().ToString().c_str());
throw std::runtime_error("Failed to read index entry");
}
header.nSolution = dbindex.GetSolution();

View File

@@ -690,8 +690,7 @@ public:
header.nVersion = nVersion;
header.hashPrevBlock = hashPrev;
header.hashMerkleRoot = hashMerkleRoot;
// Hush does not have this, maybe some day
// header.hashBlockCommitments = hashBlockCommitments;
header.hashFinalSaplingRoot = hashFinalSaplingRoot;
header.nTime = nTime;
header.nBits = nBits;
header.nNonce = nNonce;