mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Save some space, maintain compatibility with elements-0.14 header index
This commit is contained in:
parent
dd1623af0a
commit
87c06d4091
2 changed files with 6 additions and 7 deletions
12
src/chain.h
12
src/chain.h
|
|
@ -210,7 +210,6 @@ public:
|
||||||
int32_t nVersion;
|
int32_t nVersion;
|
||||||
uint256 hashMerkleRoot;
|
uint256 hashMerkleRoot;
|
||||||
uint32_t nTime;
|
uint32_t nTime;
|
||||||
uint32_t block_height;
|
|
||||||
uint32_t nBits;
|
uint32_t nBits;
|
||||||
uint32_t nNonce;
|
uint32_t nNonce;
|
||||||
CProof proof;
|
CProof proof;
|
||||||
|
|
@ -240,7 +239,6 @@ public:
|
||||||
nVersion = 0;
|
nVersion = 0;
|
||||||
hashMerkleRoot = uint256();
|
hashMerkleRoot = uint256();
|
||||||
nTime = 0;
|
nTime = 0;
|
||||||
block_height = 0;
|
|
||||||
nBits = 0;
|
nBits = 0;
|
||||||
nNonce = 0;
|
nNonce = 0;
|
||||||
proof.SetNull();
|
proof.SetNull();
|
||||||
|
|
@ -258,7 +256,6 @@ public:
|
||||||
nVersion = block.nVersion;
|
nVersion = block.nVersion;
|
||||||
hashMerkleRoot = block.hashMerkleRoot;
|
hashMerkleRoot = block.hashMerkleRoot;
|
||||||
nTime = block.nTime;
|
nTime = block.nTime;
|
||||||
block_height = block.block_height;
|
|
||||||
nBits = block.nBits;
|
nBits = block.nBits;
|
||||||
nNonce = block.nNonce;
|
nNonce = block.nNonce;
|
||||||
proof = block.proof;
|
proof = block.proof;
|
||||||
|
|
@ -290,7 +287,9 @@ public:
|
||||||
block.hashPrevBlock = pprev->GetBlockHash();
|
block.hashPrevBlock = pprev->GetBlockHash();
|
||||||
block.hashMerkleRoot = hashMerkleRoot;
|
block.hashMerkleRoot = hashMerkleRoot;
|
||||||
block.nTime = nTime;
|
block.nTime = nTime;
|
||||||
block.block_height = block_height;
|
if (g_con_blockheightinheader) {
|
||||||
|
block.block_height = nHeight;
|
||||||
|
}
|
||||||
block.nBits = nBits;
|
block.nBits = nBits;
|
||||||
block.nNonce = nNonce;
|
block.nNonce = nNonce;
|
||||||
block.proof = proof;
|
block.proof = proof;
|
||||||
|
|
@ -411,7 +410,6 @@ public:
|
||||||
READWRITE(hashPrev);
|
READWRITE(hashPrev);
|
||||||
READWRITE(hashMerkleRoot);
|
READWRITE(hashMerkleRoot);
|
||||||
READWRITE(nTime);
|
READWRITE(nTime);
|
||||||
READWRITE(block_height);
|
|
||||||
// For compatibility with elements 0.14 based chains
|
// For compatibility with elements 0.14 based chains
|
||||||
if (g_signed_blocks) {
|
if (g_signed_blocks) {
|
||||||
READWRITE(proof);
|
READWRITE(proof);
|
||||||
|
|
@ -428,7 +426,9 @@ public:
|
||||||
block.hashPrevBlock = hashPrev;
|
block.hashPrevBlock = hashPrev;
|
||||||
block.hashMerkleRoot = hashMerkleRoot;
|
block.hashMerkleRoot = hashMerkleRoot;
|
||||||
block.nTime = nTime;
|
block.nTime = nTime;
|
||||||
block.block_height = block_height;
|
if (g_con_blockheightinheader) {
|
||||||
|
block.block_height = nHeight;
|
||||||
|
}
|
||||||
block.nBits = nBits;
|
block.nBits = nBits;
|
||||||
block.nNonce = nNonce;
|
block.nNonce = nNonce;
|
||||||
block.proof = proof;
|
block.proof = proof;
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,6 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams,
|
||||||
CBlockIndex* pindexNew = insertBlockIndex(diskindex.GetBlockHash());
|
CBlockIndex* pindexNew = insertBlockIndex(diskindex.GetBlockHash());
|
||||||
pindexNew->pprev = insertBlockIndex(diskindex.hashPrev);
|
pindexNew->pprev = insertBlockIndex(diskindex.hashPrev);
|
||||||
pindexNew->nHeight = diskindex.nHeight;
|
pindexNew->nHeight = diskindex.nHeight;
|
||||||
pindexNew->block_height = diskindex.block_height;
|
|
||||||
pindexNew->nFile = diskindex.nFile;
|
pindexNew->nFile = diskindex.nFile;
|
||||||
pindexNew->nDataPos = diskindex.nDataPos;
|
pindexNew->nDataPos = diskindex.nDataPos;
|
||||||
pindexNew->nUndoPos = diskindex.nUndoPos;
|
pindexNew->nUndoPos = diskindex.nUndoPos;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue