gossamer
gossamer copied to clipboard
Unrestricted Loop When Building Blocks (GSR-19)
There is a loop when building BABE blocks that is unrestricted. While the slot has not finished, the builder will continue to poll the transactionState for new transactions. This is done in a loop without sleeps in between. The result is an excessive use of resources and constant grabbing and releasing of the transaction queue lock.
One solution is to add a small sleep when txn == nil to avoid continued, excessive polling of the transactionState.