Fix missing hashFinalSaplingRoot in block header
This commit is contained in:
@@ -52,8 +52,7 @@ CBlockHeader CBlockIndex::GetBlockHeader() const
|
|||||||
header.hashPrevBlock = pprev->GetBlockHash();
|
header.hashPrevBlock = pprev->GetBlockHash();
|
||||||
}
|
}
|
||||||
header.hashMerkleRoot = hashMerkleRoot;
|
header.hashMerkleRoot = hashMerkleRoot;
|
||||||
// Hush does not have this, maybe some day
|
header.hashFinalSaplingRoot = hashFinalsaplingRoot;
|
||||||
// header.hashBlockCommitments = hashBlockCommitments;
|
|
||||||
header.nTime = nTime;
|
header.nTime = nTime;
|
||||||
header.nBits = nBits;
|
header.nBits = nBits;
|
||||||
header.nNonce = nNonce;
|
header.nNonce = nNonce;
|
||||||
@@ -62,7 +61,7 @@ CBlockHeader CBlockIndex::GetBlockHeader() const
|
|||||||
} else {
|
} else {
|
||||||
CDiskBlockIndex dbindex;
|
CDiskBlockIndex dbindex;
|
||||||
if (!pblocktree->ReadDiskBlockIndex(GetBlockHash(), 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");
|
throw std::runtime_error("Failed to read index entry");
|
||||||
}
|
}
|
||||||
header.nSolution = dbindex.GetSolution();
|
header.nSolution = dbindex.GetSolution();
|
||||||
|
|||||||
@@ -690,8 +690,7 @@ public:
|
|||||||
header.nVersion = nVersion;
|
header.nVersion = nVersion;
|
||||||
header.hashPrevBlock = hashPrev;
|
header.hashPrevBlock = hashPrev;
|
||||||
header.hashMerkleRoot = hashMerkleRoot;
|
header.hashMerkleRoot = hashMerkleRoot;
|
||||||
// Hush does not have this, maybe some day
|
header.hashFinalSaplingRoot = hashFinalSaplingRoot;
|
||||||
// header.hashBlockCommitments = hashBlockCommitments;
|
|
||||||
header.nTime = nTime;
|
header.nTime = nTime;
|
||||||
header.nBits = nBits;
|
header.nBits = nBits;
|
||||||
header.nNonce = nNonce;
|
header.nNonce = nNonce;
|
||||||
|
|||||||
Reference in New Issue
Block a user