Skip to content

Conversation

@sasa-tomic
Copy link
Collaborator

Changes

  • Introduced NodeOperatorComputed struct to group computed fields within NodeOperator.

  • Updated fields under the computed struct: nodes_health, total_up_nodes, rewards_correct, node_allowance_remaining, node_allowance_total, nodes_in_subnets, and nodes_in_registry.

  • Renamed allowance to node_allowance consistently across the codebase.

  • Updated logic in Registry for better encapsulation of computed properties, including calculation of node_allowance_total and condition checks involving total_up_nodes.

  • Updated tests and affected modules to reflect struct and field changes.

- Introduced `NodeOperatorComputed` struct to encapsulate computed fields from `NodeOperator`.
- Updated `node_allowance_remaining`, `node_allowance_total`, `total_up_nodes`, `nodes_health`, `rewards_correct`, `nodes_in_subnets`, and `nodes_in_registry` to be encapsulated within `NodeOperatorComputed`.
- Replaced direct accesses to `NodeOperator` fields with accesses to the corresponding fields in `NodeOperatorComputed`.
- Modified existing code to reflect this encapsulation, enhancing code organization and clarity.
- Updated tests accordingly to accommodate the new structure.
- Replaced `allowance` with `node_allowance` across various components for naming consistency.
@sasa-tomic sasa-tomic requested a review from a team as a code owner January 29, 2025 14:03
@sasa-tomic sasa-tomic self-assigned this Jan 29, 2025
@sasa-tomic sasa-tomic merged commit 628433e into main Jan 29, 2025
6 checks passed
@sasa-tomic sasa-tomic deleted the refactor-node-operator-computation branch January 29, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants