Page MenuHomePhabricator

Refactor FindMostWorkChain
ClosedPublic

Authored by deadalnix on Oct 20 2018, 15:23.

Details

Summary

Chaneg the flow a bit to reduce nesting, and add a few comments.

Test Plan
make check
./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Refactor to change fInvalidAncestor into hasValidAncestor to avoid double negations.

jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/validation.cpp
2449 ↗(On Diff #5457)

Seems like this spinning forever could be error-prone despite the comment at the top of this function. Doesn't need to be part of this diff, but we should have some sort of cycle detection in place to fail out if this appears to spin forever.

This revision is now accepted and ready to land.Oct 20 2018, 16:31
This revision was automatically updated to reflect the committed changes.