Merge pull request #4457
834e46e
CBlockIndex()::SetNull() method to avoid code repetition (jtimon)
This commit is contained in:
commit
4ed2315e86
20
src/main.h
20
src/main.h
@ -712,7 +712,7 @@ public:
|
||||
// (memory only) Sequencial id assigned to distinguish order in which blocks are received.
|
||||
uint32_t nSequenceId;
|
||||
|
||||
CBlockIndex()
|
||||
void SetNull()
|
||||
{
|
||||
phashBlock = NULL;
|
||||
pprev = NULL;
|
||||
@ -734,20 +734,14 @@ public:
|
||||
nNonce = 0;
|
||||
}
|
||||
|
||||
CBlockIndex()
|
||||
{
|
||||
SetNull();
|
||||
}
|
||||
|
||||
CBlockIndex(CBlockHeader& block)
|
||||
{
|
||||
phashBlock = NULL;
|
||||
pprev = NULL;
|
||||
pskip = NULL;
|
||||
nHeight = 0;
|
||||
nFile = 0;
|
||||
nDataPos = 0;
|
||||
nUndoPos = 0;
|
||||
nChainWork = 0;
|
||||
nTx = 0;
|
||||
nChainTx = 0;
|
||||
nStatus = 0;
|
||||
nSequenceId = 0;
|
||||
SetNull();
|
||||
|
||||
nVersion = block.nVersion;
|
||||
hashMerkleRoot = block.hashMerkleRoot;
|
||||
|
Loading…
Reference in New Issue
Block a user