mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-23 04:54:30 +00:00
fix missing nHeight field
This commit is contained in:
parent
7fd4a9f585
commit
623b80c061
@ -52,6 +52,7 @@ public:
|
||||
genesis.hashPrevBlock = 0;
|
||||
genesis.hashMerkleRoot = genesis.BuildMerkleTree();
|
||||
genesis.nVersion = 1;
|
||||
genesis.nHeight = 0;
|
||||
genesis.nTime = 1373331180;
|
||||
//genesis.nBits = 0x1d00ffff;
|
||||
genesis.nBits = 0x1d7fffff;
|
||||
|
@ -878,7 +878,7 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
|
||||
bnTarget.SetCompact(nBits);
|
||||
|
||||
//printf("CheckProofOfWork %08x %s %s\n", nBits, bnTarget.GetHex().c_str(), Params().ProofOfWorkLimit().GetHex().c_str());
|
||||
//printf("hash-bits %s\n", (hash-bnTarget.getuint256()).GetHex().c_str() );
|
||||
//printf("CheckProofOfWork hash:%s\n", hash.GetHex().c_str() );
|
||||
// Check range
|
||||
if (bnTarget <= 0 || bnTarget > Params().ProofOfWorkLimit())
|
||||
return error("CheckProofOfWork() : nBits below minimum work");
|
||||
|
@ -712,6 +712,7 @@ public:
|
||||
{
|
||||
CBlockHeader block;
|
||||
block.nVersion = nVersion;
|
||||
block.nHeight = nHeight;
|
||||
if (pprev)
|
||||
block.hashPrevBlock = pprev->GetBlockHash();
|
||||
block.hashMerkleRoot = hashMerkleRoot;
|
||||
@ -860,6 +861,7 @@ public:
|
||||
{
|
||||
CBlockHeader block;
|
||||
block.nVersion = nVersion;
|
||||
block.nHeight = nHeight;
|
||||
block.hashPrevBlock = hashPrev;
|
||||
block.hashMerkleRoot = hashMerkleRoot;
|
||||
block.nTime = nTime;
|
||||
|
Loading…
x
Reference in New Issue
Block a user