Skip to content

Remove chain head distance dependent <v9 conditional code #1174

@denravonska

Description

@denravonska

We are long into v9 blocks now and can start removing checks which depend on both <v9 blocks and being close to the chain head. For example:

bool fNeedsChecked = BlockNeedsChecked(block.nTime) || block.nVersion>=9;

if ( (pindex->nHeight % 60 == 0) && IsResearchAgeEnabled(pindex->nHeight) && BlockNeedsChecked(pindex->nTime))

if (IsResearcher(bb.cpid) && IsProofOfStake() && height1 > nGrandfather && IsResearchAgeEnabled(height1) && BlockNeedsChecked(nTime) && !fLoadingIndex)

This will help in removing obsolete checks and will make it easier to move the code later on.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions