extern uint64 nLastBlockSize;
extern int64 nLastCoinStakeSearchInterval;
extern const std::string strMessageMagic;
-extern double dHashesPerSec;
-extern int64 nHPSTimerStart;
extern int64 nTimeBestReceived;
extern CCriticalSection cs_setpwalletRegistered;
extern std::set<CWallet*> setpwalletRegistered;
// memory only
mutable std::vector<uint256> vMerkleTree;
+ uint256 hashBlock;
// Denial-of-service detection:
mutable int nDoS;
vchBlockSig.clear();
vMerkleTree.clear();
nDoS = 0;
+ hashBlock = 0;
}
bool IsNull() const
return (nBits == 0);
}
- uint256 GetHash() const
+ uint256 GetHash(bool fRehash=false) const
{
- uint256 thash;
- void * scratchbuff = scrypt_buffer_alloc();
-
- scrypt_hash(CVOIDBEGIN(nVersion), sizeof(block_header), UINTBEGIN(thash), scratchbuff);
-
- scrypt_buffer_free(scratchbuff);
-
- return thash;
+ return scrypt_blockhash(CVOIDBEGIN(nVersion));
}
int64 GetBlockTime() const