-
Notifications
You must be signed in to change notification settings - Fork 626
Corrected typos #1595
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
Corrected typos #1595
Conversation
WalkthroughThis pull request refactors variable naming and updates return values in the service container endpoint method. It also adjusts an import and corresponding parameter in a WebSocket test function for compression handling. Additionally, the PR renames a variable and revises a condition in a method that checks chunk proof readiness, ensuring consistency and clarity in the codebase. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant TestcontainerApps
Client->>TestcontainerApps: GetPoSL1EndPoint()
TestcontainerApps-->>Client: Return (container, constrained)
sequenceDiagram
participant Caller
participant ProofReceiverLogic
Caller->>ProofReceiverLogic: checkAreAllChunkProofsReady()
ProofReceiverLogic->>ProofReceiverLogic: Evaluate readiness (using 'already')
ProofReceiverLogic-->>Caller: Return readiness result
Possibly related PRs
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
common/testcontainers/testcontainers.go
(1 hunks)common/utils/rpc_test.go
(2 hunks)coordinator/internal/logic/submitproof/proof_receiver.go
(1 hunks)
🧰 Additional context used
🪛 golangci-lint (1.62.2)
common/testcontainers/testcontainers.go
162-162: assignment mismatch: 3 variables but t.poSL1Container.ServiceContainer returns 2 values
(typecheck)
coordinator/internal/logic/submitproof/proof_receiver.go
228-228: expected 1 expression
(typecheck)
232-232: expected 1 expression
(typecheck)
|
||
import ( | ||
"compress/flate" | ||
"compress/flat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect import package name.
The package compress/flat
does not exist in Go's standard library. The correct package name is compress/flate
which provides DEFLATE compression.
Apply this diff to fix the import:
- "compress/flat"
+ "compress/flate"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"compress/flat" | |
"compress/flate" |
Service: new(testService), | ||
}, | ||
}, flate.NoCompression) | ||
}, flat.NoCompression) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix package reference in function call.
The package reference needs to be updated to match the correct import.
Apply this diff to fix the package reference:
- }, flat.NoCompression)
+ }, flate.NoCompression)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
}, flat.NoCompression) | |
}, flate.NoCompression) |
return "", errors.New("PoS L1 container is not running") | ||
} | ||
contrainer, err := t.poSL1Container.ServiceContainer(context.Background(), "geth") | ||
container, constrained, err := t.poSL1Container.ServiceContainer(context.Background(), "geth") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect variable assignment.
The method ServiceContainer
returns only 2 values but the code tries to assign to 3 variables. Additionally, the variable name constrained
appears to be a typo of container
.
Apply this diff to fix the variable assignment:
- container, constrained, err := t.poSL1Container.ServiceContainer(context.Background(), "geth")
- return container, constrained.PortEndpoint(context.Background(), "8545/tcp", "http")
+ container, err := t.poSL1Container.ServiceContainer(context.Background(), "geth")
+ return container.Name, container.PortEndpoint(context.Background(), "8545/tcp", "http")
Also applies to: 166-166
🧰 Tools
🪛 golangci-lint (1.62.2)
162-162: assignment mismatch: 3 variables but t.poSL1Container.ServiceContainer returns 2 values
(typecheck)
already, all ready, err := m.chunkOrm.CheckIfBatchChunkProofsAreReady(ctx, batch.BatchHash) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix syntax errors in variable assignment and condition.
The code has two issues:
- The variable names
already, all ready
create a syntax error. - The condition
if already, all ready {
is syntactically invalid.
Apply this diff to fix the syntax:
- already, all ready, err := m.chunkOrm.CheckIfBatchChunkProofsAreReady(ctx, batch.BatchHash)
- if already, all ready {
+ allReady, err := m.chunkOrm.CheckIfBatchChunkProofsAreReady(ctx, batch.BatchHash)
+ if allReady {
Also applies to: 232-232
🧰 Tools
🪛 golangci-lint (1.62.2)
228-228: expected 1 expression
(typecheck)
Changes
/coordinator/internal/logic/submitproof/proof_receiver.go
allReady
toalready, all ready
(Line 232)/common/utils/rpc_test.go
flate
toflat
(Line 4)/common/testcontainers/testcontainers.go
contrainer
tocontainer, constrained
(Line 166)Purpose
Summary by CodeRabbit