Compute MinPowerToOptIn in EndBlock and cache, instead of computing on-the-fly #1842
Labels
S: ImprovingThings
Improving things: Customer requests, performance improvements, reliability and usability
scope: provider
Issues related to the provider chain
scope: UI
Addressing UX changes and improvements to user interface
source: codereview
To indicate an issue found during a code review.
The call to
ComputeMinPowerToOptIn
is expensive. It requires getting the list of all bonded validators and iterate twice over it. It might be better to cache the value inEndBlock
when sending VSCPackets. Note that it also needs to be initialized during the migration as it might be needed inBeginBlock
for proposals.Originally posted by @mpoke in #1809 (comment)
The text was updated successfully, but these errors were encountered: