Closed pfi79 closed 1 year ago
Can you please provide a unit-test which clearly demonstrates the issue you are addressing in the commit?
Can you please provide a unit-test which clearly demonstrates the issue you are addressing in the commit?
So far I have not been able to create a test in which this error always appears. But I will add the test.log of the test in which this error occurred
Can you please provide a unit-test which clearly demonstrates the issue you are addressing in the commit?
I added a test.
Proposal delivery can come from 2 goroutines: Controller and ViewChanger. 4 places:
Goroutines are fairly independent. It is required to ensure that delivery is not at the same time and that there is no twice delivery. To prevent at the same time delivery, all deliveries are performed from under the syncLock mutex. To prevent twice delivery, the Checkpoint parameter is implemented. Before delivery, the code reads Checkpoint and decides if the proposal should be delivered. After delivery, the code must set a new value in Checkpoint. Without this, double delivery is possible.
Found the last place where proposals can be delivered and Checkpoint is not set. This pull request fixes this error.