fix: check tx result err in filter inbound events#3914
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughA precondition check for transaction errors has been added to the Solana inbound event filtering process. The function now immediately returns if the transaction result indicates an error, preventing further event parsing and processing for failed transactions. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant FilterInboundEvents
participant SolanaTxResult
participant EventParser
Caller->>FilterInboundEvents: Call with txResult, gatewayID, senderChainID, logger
FilterInboundEvents->>SolanaTxResult: Check txResult.Meta.Err
alt txResult.Meta.Err != nil
FilterInboundEvents-->>Caller: Return error (transaction reverted)
else txResult.Meta.Err == nil
FilterInboundEvents->>EventParser: Parse events
EventParser-->>FilterInboundEvents: Return parsed events
FilterInboundEvents-->>Caller: Return events
end
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3914 +/- ##
========================================
Coverage 64.99% 64.99%
========================================
Files 470 470
Lines 34351 34354 +3
========================================
+ Hits 22326 22329 +3
Misses 10993 10993
Partials 1032 1032
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
changelog.md(1 hunks)zetaclient/chains/solana/observer/inbound.go(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.go`: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
**/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/solana/observer/inbound.go
🪛 GitHub Check: codecov/patch
zetaclient/chains/solana/observer/inbound.go
[warning] 153-154: zetaclient/chains/solana/observer/inbound.go#L153-L154
Added lines #L153 - L154 were not covered by tests
🔇 Additional comments (1)
changelog.md (1)
54-54: LGTM!The changelog entry is properly formatted and accurately describes the fix.
|
i dont know why this keep getting kicked out of merge queue, trying again |
Description
https://github.com/zeta-chain/protocol-private/issues/242
How Has This Been Tested?
Summary by CodeRabbit