-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Description
createNetworkStateForNode is used in smart node to query the state of the network for a single node operator in many of its low-touch tasks.
However, it appears to query the state for every single node's megapool details:
| state.MegapoolValidatorGlobalIndex, err = rpstate.GetAllMegapoolValidators(m.rp, contracts) |
This causes a large amount of wasted work in the rocketpool_node daemon.
The code is also not particularly DRY. I recommend refactoring so that createNetworkStateForNode and createNetworkState share an implementation, and pass through an optional list of nodes for which to query the state (empty or nil list means all)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels