Join GitHub today
Cleanup, refactor, and improve GetMissingNodes #1979
Split SHAMap::getMissingNodes into three functions, cleanup and improve comments. Algorithmic improvements include avoiding the need to restart from the root.
In my quick benchmarks:
The first patch (Make ledger fetch tuning saner) uses the configured fetch limit in one case where we had a limit hard coded in. It also bumps the limits a bit for the larger node sizes.
The second patch fixes a bug that could cause a non-validator to crash in rare cases were it opted to bow out the middle of consensus. The code attempted to send a proposal unconditionally which will fail if we're not a validator because we don't have a valid signing key.
HowardHinnant left a comment
Really nice job. I especially appreciated the explicit deleting of the special copy members of
This refactor makes
One could make the new
Everything passes on macOS.