|
|
@ -512,13 +512,7 @@ public: |
|
|
|
|
|
|
|
uint256 GetBlockHash() const |
|
|
|
{ |
|
|
|
if(phashBlock == NULL) { |
|
|
|
auto header = this->GetBlockHeader(); |
|
|
|
auto blockhash = header.GetHash(); |
|
|
|
fprintf(stderr, "GetBlockHash: phashBlock NULL at height %d, returning blockhash=%s instead\n", this->GetHeight(), blockhash.ToString().c_str() ); |
|
|
|
// assert(phashBlock);
|
|
|
|
return blockhash; |
|
|
|
} |
|
|
|
assert(phashBlock); |
|
|
|
return *phashBlock; |
|
|
|
} |
|
|
|
|
|
|
@ -683,6 +677,11 @@ public: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
uint256 GetBlockHash() const |
|
|
|
{ |
|
|
|
return GetBlockHeader().GetHash(); |
|
|
|
} |
|
|
|
|
|
|
|
//! Get the block header for this block index.
|
|
|
|
CBlockHeader GetBlockHeader() const |
|
|
|
{ |
|
|
|