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

Nil checks in disperser v2 server constructor #1024

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

ian-shim
Copy link
Contributor

Why are these changes needed?

Checks

  • 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.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@ian-shim ian-shim marked this pull request as ready for review December 17, 2024 19:24
@ian-shim ian-shim force-pushed the disperser-v2-nil-checks branch from 09f47ba to b1687ca Compare December 17, 2024 20:19
@ian-shim ian-shim requested a review from hopeyen December 17, 2024 20:19
@@ -232,6 +257,9 @@ func (s *DispersalServerV2) RefreshOnchainState(ctx context.Context) error {
}

func (s *DispersalServerV2) GetPaymentState(ctx context.Context, req *pb.GetPaymentStateRequest) (*pb.GetPaymentStateReply, error) {
if s.meterer == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we check nil meterer here instead of in the NewDispersalServerV2 constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to get around with disabling payments. Currently, payment's disabled and meterer is not set. We still want the server to run until we reenable it

@hopeyen hopeyen self-requested a review December 17, 2024 23:14
@ian-shim ian-shim merged commit 4faad4d into Layr-Labs:master Dec 17, 2024
8 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.

2 participants