Skip to content

Refactor NodeBLSMappings weight APIs to use uint64#380

Closed
samliok wants to merge 2 commits into
mainfrom
encoding-uint64-weights
Closed

Refactor NodeBLSMappings weight APIs to use uint64#380
samliok wants to merge 2 commits into
mainfrom
encoding-uint64-weights

Conversation

@samliok
Copy link
Copy Markdown
Collaborator

@samliok samliok commented May 5, 2026

Summary

  • Extracted from Simplex reconfiguration framework - Part III (MSM implementation) #365 (reconfig-3, MSM Part III) so the API change can be reviewed independently.
  • NodeBLSMappings.TotalWeight() now returns uint64 instead of int64. The internal overflow check against math.MaxInt64 is preserved.
  • ApprovingWeight (which returned a single summed int64) is replaced by ApprovingWeights, which returns the per-node []uint64 slice. This lets callers run their own threshold logic without bouncing through int64.

Change TotalWeight to return uint64 instead of int64, and replace
ApprovingWeight (returning a single summed weight) with
ApprovingWeights, which returns the per-node weight slice. This lets
callers compute thresholds without an intermediate int64 conversion.
@samliok samliok closed this May 5, 2026
@samliok samliok reopened this May 5, 2026
@samliok samliok closed this May 5, 2026
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.

2 participants