The addition of the milestone stage and consolidation of milestone logic has resulted in a couple of small bugs that need patching before we merge with dev.
The first is that milestones were being registered in the milestone stage, which meant that the latest milestone object would be updated prior to validation. Removing this from the milestone stage fixes that issue.
Secondly the thread did not have a sleep timer at all, and it was eating up more cpu and memory than necessary. A 500 millisecond sleep mitigates this issue without damaging performance.
Thirdly I added a couple of additional logs to improve understanding of the code.
Type of change
Bug Fix
How the change has been tested
Ran nodes on an internal test network and profiled them to make sure they worked, and didn't overload the cpu as much.
Change checklist
[x] My code follows the contribution guidelines for this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] New and existing unit tests pass locally with my changes
Description of change
The addition of the milestone stage and consolidation of milestone logic has resulted in a couple of small bugs that need patching before we merge with dev.
The first is that milestones were being registered in the milestone stage, which meant that the latest milestone object would be updated prior to validation. Removing this from the milestone stage fixes that issue.
Secondly the thread did not have a sleep timer at all, and it was eating up more cpu and memory than necessary. A 500 millisecond sleep mitigates this issue without damaging performance.
Thirdly I added a couple of additional logs to improve understanding of the code.
Type of change
How the change has been tested
Ran nodes on an internal test network and profiled them to make sure they worked, and didn't overload the cpu as much.
Change checklist