File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -181,16 +181,16 @@ Blocks received while in the MUST_SIGNAL phase must be checked to ensure that th
181
181
182
182
if (GetStateForBlock(block) == MUST_SIGNAL) {
183
183
int nonsignal = 0;
184
- int count = 1 + (block.nHeight % 2016);
185
184
walk = block;
186
- while (count > 0) {
187
- --count;
185
+ while (true) {
188
186
if ((walk.nVersion & 0xE0000000) != 0x20000000 || ((walk.nVersion >> bit) & 1) != 1) {
189
187
++nonsignal;
190
- if (nonsignal + threshold > 2016) {
188
+ if (nonsignal > 2016 - threshold ) {
191
189
return state.Invalid(BlockValidationResult::RECENT_CONSENSUS_CHANGE, "bad-version-bip8-must-signal");
192
190
}
193
- } else if (nonsignal == 0) {
191
+ }
192
+ if (walk.nHeight % 2016 == 0) {
193
+ // checked every block in this retarget period
194
194
break;
195
195
}
196
196
walk = walk.parent;
You can’t perform that action at this time.
0 commit comments