-
Notifications
You must be signed in to change notification settings - Fork 174
chore: fix some function names in comment #4525
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: oncecelll <oncecell@outlook.com>
PR SummaryMinor comment-only fixes to align function names with their doc comments. No functional code changes.
Written by Cursor Bugbot for commit 05f869f. Configure here. |
📝 WalkthroughWalkthroughTwo localized updates were made: a method in the Sui e2e runner was renamed and refactored to change its signature and return type, now accepting no parameters and returning an error alongside a payload; and a documentation comment was corrected in the zetaclient config types. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 0
🧹 Nitpick comments (1)
e2e/runner/sui.go (1)
237-253: Consider removing the unused error return value.This method consistently returns
nilfor the error. Given the E2E runner pattern documented in the learnings, methods in this context typically use assertions (requirestatements) rather than returning errors. The current signature is inconsistent with similar methods in this file (e.g.,SuiGetSUIBalanceat lines 30-41,SuiCreateExampleWACPayloadat lines 210-235).♻️ Proposed refactor to match E2E runner patterns
-// SuiCreateExampleWACPayloadForRevert creates a payload that triggers a revert in the 'on_call' -// function in Sui the example package -func (r *E2ERunner) SuiCreateExampleWACPayloadForRevert() (sui.CallPayload, error) { +// SuiCreateExampleWACPayloadForRevert creates a payload that triggers a revert in the 'on_call' +// function in Sui the example package +func (r *E2ERunner) SuiCreateExampleWACPayloadForRevert() sui.CallPayload { // only the CCTX's coinType is needed, no additional arguments argumentTypes := []string{} objects := []string{ r.SuiExample.GlobalConfigID.String(), r.SuiExample.PartnerID.String(), r.SuiExample.ClockID.String(), } // the 'on_call' method of the "connected" contract specifically throws an error // for this message to trigger "tx revert" test case message := []byte(onCallRevertMessage) - return sui.NewCallPayload(argumentTypes, objects, message), nil + return sui.NewCallPayload(argumentTypes, objects, message) }Based on learnings, E2E runner balance check methods were refactored from error-returning to assertion-based approaches.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
e2e/runner/sui.gozetaclient/config/types.go
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go
⚙️ CodeRabbit configuration file
Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
Files:
zetaclient/config/types.goe2e/runner/sui.go
🧠 Learnings (2)
📓 Common learnings
Learnt from: gartnera
Repo: zeta-chain/node PR: 3070
File: cmd/zetae2e/init.go:0-0
Timestamp: 2024-10-30T17:56:16.341Z
Learning: In code reviews for Go files like `cmd/zetae2e/init.go` in the ZetaChain project, avoid suggesting unrelated refactoring. Focus comments on changes relevant to the PR objectives.
Learnt from: gartnera
Repo: zeta-chain/node PR: 3228
File: zetaclient/orchestrator/orchestrator.go:388-401
Timestamp: 2024-11-27T22:01:49.732Z
Learning: When reviewing code changes in `zetaclient/orchestrator/orchestrator.go`, avoid suggesting refactoring that is unrelated to the current PR.
Learnt from: gartnera
Repo: zeta-chain/node PR: 3228
File: cmd/zetaclientd/start.go:222-231
Timestamp: 2024-11-27T22:02:48.034Z
Learning: In the `zetaclient` codebase, port numbers like `26657` are hardcoded, and changing them to be configurable via the config struct is considered unrelated refactoring.
Learnt from: kingpinXD
Repo: zeta-chain/node PR: 4064
File: cmd/zetae2e/local/solana.go:0-0
Timestamp: 2025-08-06T01:54:04.100Z
Learning: The `CheckSolanaTSSBalance()` method in e2e/runner has been refactored to not return an error. Instead, it uses internal assertions (require statements) to fail the test immediately if balance checks fail. This is part of a broader refactoring pattern in the E2E runner where balance check methods were changed from error-returning to assertion-based approaches.
Learnt from: skosito
Repo: zeta-chain/node PR: 3939
File: go.mod:52-52
Timestamp: 2025-05-30T16:31:30.275Z
Learning: The ethermint dependency updates in the zeta-chain/node repository are typically moves between feature branches and main branch of the same fork, not breaking API changes. CI status should be verified before assuming compilation issues.
Learnt from: kingpinXD
Repo: zeta-chain/node PR: 3503
File: e2e/runner/require.go:0-0
Timestamp: 2025-02-07T19:33:35.631Z
Learning: In e2e tests for the zeta-chain/node repository, minimize computation and avoid redundant checks that are already covered by unit tests to ensure faster execution. For example, ballot sorting is verified in unit tests, so e2e tests can safely assume the order.
Learnt from: lumtis
Repo: zeta-chain/node PR: 2459
File: e2e/config/config.go:285-293
Timestamp: 2024-07-11T13:10:39.153Z
Learning: Tests should not be suggested in the `e2e` package for the `zeta-chain/node` repository.
📚 Learning: 2025-08-06T01:54:04.100Z
Learnt from: kingpinXD
Repo: zeta-chain/node PR: 4064
File: cmd/zetae2e/local/solana.go:0-0
Timestamp: 2025-08-06T01:54:04.100Z
Learning: The `CheckSolanaTSSBalance()` method in e2e/runner has been refactored to not return an error. Instead, it uses internal assertions (require statements) to fail the test immediately if balance checks fail. This is part of a broader refactoring pattern in the E2E runner where balance check methods were changed from error-returning to assertion-based approaches.
Applied to files:
e2e/runner/sui.go
🔇 Additional comments (1)
zetaclient/config/types.go (1)
224-224: LGTM: Comment now correctly references the method name.The documentation fix accurately reflects the actual method name
ResolvePublicIP, resolving the inconsistency with the previously incorrect reference toResolvePublicDNS4.
Description
fix some function names in comment
How Has This Been Tested?
Summary by CodeRabbit
Release Notes
Refactor
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.