iotaledger / iri

IOTA Reference Implementation
Other
1.15k stars 370 forks source link

Logs and bug patches for milestone solidification #1842

Closed DyrellC closed 4 years ago

DyrellC commented 4 years ago

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