Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix null pointer reference #397

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Conversation

jianoaix
Copy link
Contributor

@jianoaix jianoaix commented Mar 26, 2024

Why are these changes needed?

Currently the nonsigning rate has a bug to handle quorums when: 1) operator has opted in to the quorum; but 2) the quorum has no batches.

Tested: locally tested and it worked

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@jianoaix jianoaix requested a review from dmanc March 26, 2024 23:12
@@ -223,8 +223,10 @@ func computeNumResponsible(batches []*BatchNonSigningInfo, operatorQuorumInterva
for op, val := range operatorQuorumIntervals {
for q, intervals := range val {
numBatches := 0
for _, interval := range intervals {
numBatches = numBatches + ComputeNumBatches(quorumBatches[q], interval.StartBlock, interval.EndBlock)
if _, ok := quorumBatches[q]; ok {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Real change is here. All others are just renaming.

@jianoaix jianoaix merged commit 92cd38a into Layr-Labs:master Mar 27, 2024
6 checks passed
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.

None yet

2 participants