Rename hashReserved to hashSaplingAnchorEnd.
This commit is contained in:
parent
08f0728884
commit
691a3fa2e9
12
src/chain.h
12
src/chain.h
|
@ -169,7 +169,7 @@ public:
|
||||||
//! block header
|
//! block header
|
||||||
int nVersion;
|
int nVersion;
|
||||||
uint256 hashMerkleRoot;
|
uint256 hashMerkleRoot;
|
||||||
uint256 hashReserved;
|
uint256 hashSaplingAnchorEnd;
|
||||||
unsigned int nTime;
|
unsigned int nTime;
|
||||||
unsigned int nBits;
|
unsigned int nBits;
|
||||||
uint256 nNonce;
|
uint256 nNonce;
|
||||||
|
@ -200,7 +200,7 @@ public:
|
||||||
|
|
||||||
nVersion = 0;
|
nVersion = 0;
|
||||||
hashMerkleRoot = uint256();
|
hashMerkleRoot = uint256();
|
||||||
hashReserved = uint256();
|
hashSaplingAnchorEnd = uint256();
|
||||||
nTime = 0;
|
nTime = 0;
|
||||||
nBits = 0;
|
nBits = 0;
|
||||||
nNonce = uint256();
|
nNonce = uint256();
|
||||||
|
@ -218,7 +218,7 @@ public:
|
||||||
|
|
||||||
nVersion = block.nVersion;
|
nVersion = block.nVersion;
|
||||||
hashMerkleRoot = block.hashMerkleRoot;
|
hashMerkleRoot = block.hashMerkleRoot;
|
||||||
hashReserved = block.hashReserved;
|
hashSaplingAnchorEnd = block.hashSaplingAnchorEnd;
|
||||||
nTime = block.nTime;
|
nTime = block.nTime;
|
||||||
nBits = block.nBits;
|
nBits = block.nBits;
|
||||||
nNonce = block.nNonce;
|
nNonce = block.nNonce;
|
||||||
|
@ -250,7 +250,7 @@ public:
|
||||||
if (pprev)
|
if (pprev)
|
||||||
block.hashPrevBlock = pprev->GetBlockHash();
|
block.hashPrevBlock = pprev->GetBlockHash();
|
||||||
block.hashMerkleRoot = hashMerkleRoot;
|
block.hashMerkleRoot = hashMerkleRoot;
|
||||||
block.hashReserved = hashReserved;
|
block.hashSaplingAnchorEnd = hashSaplingAnchorEnd;
|
||||||
block.nTime = nTime;
|
block.nTime = nTime;
|
||||||
block.nBits = nBits;
|
block.nBits = nBits;
|
||||||
block.nNonce = nNonce;
|
block.nNonce = nNonce;
|
||||||
|
@ -372,7 +372,7 @@ public:
|
||||||
READWRITE(this->nVersion);
|
READWRITE(this->nVersion);
|
||||||
READWRITE(hashPrev);
|
READWRITE(hashPrev);
|
||||||
READWRITE(hashMerkleRoot);
|
READWRITE(hashMerkleRoot);
|
||||||
READWRITE(hashReserved);
|
READWRITE(hashSaplingAnchorEnd);
|
||||||
READWRITE(nTime);
|
READWRITE(nTime);
|
||||||
READWRITE(nBits);
|
READWRITE(nBits);
|
||||||
READWRITE(nNonce);
|
READWRITE(nNonce);
|
||||||
|
@ -391,7 +391,7 @@ public:
|
||||||
block.nVersion = nVersion;
|
block.nVersion = nVersion;
|
||||||
block.hashPrevBlock = hashPrev;
|
block.hashPrevBlock = hashPrev;
|
||||||
block.hashMerkleRoot = hashMerkleRoot;
|
block.hashMerkleRoot = hashMerkleRoot;
|
||||||
block.hashReserved = hashReserved;
|
block.hashSaplingAnchorEnd = hashSaplingAnchorEnd;
|
||||||
block.nTime = nTime;
|
block.nTime = nTime;
|
||||||
block.nBits = nBits;
|
block.nBits = nBits;
|
||||||
block.nNonce = nNonce;
|
block.nNonce = nNonce;
|
||||||
|
|
|
@ -374,7 +374,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||||
|
|
||||||
// Fill in header
|
// Fill in header
|
||||||
pblock->hashPrevBlock = pindexPrev->GetBlockHash();
|
pblock->hashPrevBlock = pindexPrev->GetBlockHash();
|
||||||
pblock->hashReserved = uint256();
|
pblock->hashSaplingAnchorEnd = uint256(); // TODO
|
||||||
UpdateTime(pblock, Params().GetConsensus(), pindexPrev);
|
UpdateTime(pblock, Params().GetConsensus(), pindexPrev);
|
||||||
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, Params().GetConsensus());
|
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, Params().GetConsensus());
|
||||||
pblock->nSolution.clear();
|
pblock->nSolution.clear();
|
||||||
|
|
|
@ -112,12 +112,12 @@ uint256 CBlock::CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMer
|
||||||
std::string CBlock::ToString() const
|
std::string CBlock::ToString() const
|
||||||
{
|
{
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
s << strprintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, hashReserved=%s, nTime=%u, nBits=%08x, nNonce=%s, vtx=%u)\n",
|
s << strprintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, hashSaplingAnchorEnd=%s, nTime=%u, nBits=%08x, nNonce=%s, vtx=%u)\n",
|
||||||
GetHash().ToString(),
|
GetHash().ToString(),
|
||||||
nVersion,
|
nVersion,
|
||||||
hashPrevBlock.ToString(),
|
hashPrevBlock.ToString(),
|
||||||
hashMerkleRoot.ToString(),
|
hashMerkleRoot.ToString(),
|
||||||
hashReserved.ToString(),
|
hashSaplingAnchorEnd.ToString(),
|
||||||
nTime, nBits, nNonce.ToString(),
|
nTime, nBits, nNonce.ToString(),
|
||||||
vtx.size());
|
vtx.size());
|
||||||
for (unsigned int i = 0; i < vtx.size(); i++)
|
for (unsigned int i = 0; i < vtx.size(); i++)
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
int32_t nVersion;
|
int32_t nVersion;
|
||||||
uint256 hashPrevBlock;
|
uint256 hashPrevBlock;
|
||||||
uint256 hashMerkleRoot;
|
uint256 hashMerkleRoot;
|
||||||
uint256 hashReserved;
|
uint256 hashSaplingAnchorEnd;
|
||||||
uint32_t nTime;
|
uint32_t nTime;
|
||||||
uint32_t nBits;
|
uint32_t nBits;
|
||||||
uint256 nNonce;
|
uint256 nNonce;
|
||||||
|
@ -44,7 +44,7 @@ public:
|
||||||
READWRITE(this->nVersion);
|
READWRITE(this->nVersion);
|
||||||
READWRITE(hashPrevBlock);
|
READWRITE(hashPrevBlock);
|
||||||
READWRITE(hashMerkleRoot);
|
READWRITE(hashMerkleRoot);
|
||||||
READWRITE(hashReserved);
|
READWRITE(hashSaplingAnchorEnd);
|
||||||
READWRITE(nTime);
|
READWRITE(nTime);
|
||||||
READWRITE(nBits);
|
READWRITE(nBits);
|
||||||
READWRITE(nNonce);
|
READWRITE(nNonce);
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
nVersion = CBlockHeader::CURRENT_VERSION;
|
nVersion = CBlockHeader::CURRENT_VERSION;
|
||||||
hashPrevBlock.SetNull();
|
hashPrevBlock.SetNull();
|
||||||
hashMerkleRoot.SetNull();
|
hashMerkleRoot.SetNull();
|
||||||
hashReserved.SetNull();
|
hashSaplingAnchorEnd.SetNull();
|
||||||
nTime = 0;
|
nTime = 0;
|
||||||
nBits = 0;
|
nBits = 0;
|
||||||
nNonce = uint256();
|
nNonce = uint256();
|
||||||
|
@ -118,7 +118,7 @@ public:
|
||||||
block.nVersion = nVersion;
|
block.nVersion = nVersion;
|
||||||
block.hashPrevBlock = hashPrevBlock;
|
block.hashPrevBlock = hashPrevBlock;
|
||||||
block.hashMerkleRoot = hashMerkleRoot;
|
block.hashMerkleRoot = hashMerkleRoot;
|
||||||
block.hashReserved = hashReserved;
|
block.hashSaplingAnchorEnd = hashSaplingAnchorEnd;
|
||||||
block.nTime = nTime;
|
block.nTime = nTime;
|
||||||
block.nBits = nBits;
|
block.nBits = nBits;
|
||||||
block.nNonce = nNonce;
|
block.nNonce = nNonce;
|
||||||
|
@ -158,7 +158,7 @@ public:
|
||||||
READWRITE(this->nVersion);
|
READWRITE(this->nVersion);
|
||||||
READWRITE(hashPrevBlock);
|
READWRITE(hashPrevBlock);
|
||||||
READWRITE(hashMerkleRoot);
|
READWRITE(hashMerkleRoot);
|
||||||
READWRITE(hashReserved);
|
READWRITE(hashSaplingAnchorEnd);
|
||||||
READWRITE(nTime);
|
READWRITE(nTime);
|
||||||
READWRITE(nBits);
|
READWRITE(nBits);
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
|
||||||
pindexNew->hashSproutAnchor = diskindex.hashSproutAnchor;
|
pindexNew->hashSproutAnchor = diskindex.hashSproutAnchor;
|
||||||
pindexNew->nVersion = diskindex.nVersion;
|
pindexNew->nVersion = diskindex.nVersion;
|
||||||
pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot;
|
pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot;
|
||||||
pindexNew->hashReserved = diskindex.hashReserved;
|
pindexNew->hashSaplingAnchorEnd = diskindex.hashSaplingAnchorEnd;
|
||||||
pindexNew->nTime = diskindex.nTime;
|
pindexNew->nTime = diskindex.nTime;
|
||||||
pindexNew->nBits = diskindex.nBits;
|
pindexNew->nBits = diskindex.nBits;
|
||||||
pindexNew->nNonce = diskindex.nNonce;
|
pindexNew->nNonce = diskindex.nNonce;
|
||||||
|
|
Loading…
Reference in New Issue