Make nSequenceId init value constants

Make it easier to follow what the values come without having to go
over the comments, plus easier to maintain
This commit is contained in:
Sergi Delgado Segura
2025-01-28 12:12:36 -05:00
parent 8b91883a23
commit 18524b072e
4 changed files with 16 additions and 10 deletions

View File

@@ -218,7 +218,7 @@ CBlockIndex* BlockManager::AddToBlockIndex(const CBlockHeader& block, CBlockInde
// We assign the sequence id to blocks only when the full data is available,
// to avoid miners withholding blocks but broadcasting headers, to get a
// competitive advantage.
pindexNew->nSequenceId = 1;
pindexNew->nSequenceId = SEQ_ID_INIT_FROM_DISK;
pindexNew->phashBlock = &((*mi).first);
BlockMap::iterator miPrev = m_block_index.find(block.hashPrevBlock);