Page MenuHomePhabricator

Extract the flag selection logic out of CheckBlock
ClosedPublic

Authored by deadalnix on Sep 4 2017, 12:02.

Details

Summary

As it can be reused and/or tested when modified.

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Sep 4 2017, 12:02
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 4 2017, 12:02
sickpig added a subscriber: sickpig.Sep 5 2017, 09:51

Seems ok from here, wonder if we could avoid the repetition of this check

if (VersionBitsState(pindex->pprev, consensusparams,
                     Consensus::DEPLOYMENT_CSV,
                     versionbitscache) == THRESHOLD_ACTIVE) {
sickpig accepted this revision as: sickpig.Sep 6 2017, 20:10

@sickpig The check is cached, so I don't think it is that big of a deal. Later on we can set the block in stone and remove the check.

dagurval added a subscriber: dagurval.Sep 7 2017, 18:38
dagurval added inline comments.
src/validation.cpp
1726 ↗(On Diff #1309)

Comment lies, this does not enforce sequence locks.

Same comment is duplicated further down, where it does not enforce checksequence

deadalnix updated this revision to Diff 1349.Sep 7 2017, 19:20

Fix comments

dagurval accepted this revision.Sep 7 2017, 19:22
This revision is now accepted and ready to land.Sep 7 2017, 19:22
This revision was automatically updated to reflect the committed changes.