fix: add nil guards for Solana tx metadata and safe signature parsing (backport #4550 to v37)#4553
Conversation
- Add nil check for txResult.Meta before accessing Meta.Err in three locations (observer/outbound.go, signer/outbound_tracker_reporter.go, observer/inbound.go) to prevent potential nil pointer dereference - Replace MustSignatureFromBase58 with SignatureFromBase58 in inbound_tracker.go to gracefully handle invalid base58 tx hashes instead of panicking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
… as successful The previous nil guard allowed transactions with missing metadata to silently proceed as successful. This explicitly rejects nil Meta in inbound/outbound observers and continues monitoring in the tracker reporter until metadata becomes available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…il-meta-and-must-signature-v37
Summary
release/zetaclient/v37(ZetaChain mainnet)Meta != nilguard before accessingtxResult.Meta.Errin three locations to prevent potential nil pointer dereferenceMustSignatureFromBase58(panics on invalid input) withSignatureFromBase58(returns error) ininbound_tracker.goMetain inbound/outbound observers instead of silently treating them as successfulAddresses review feedback from #4552 (comment): the previous
Meta != nil && Meta.Err != nilguard allowed transactions with unknown execution status (nil metadata) to proceed through processing and voting.Before/After
txResult.Meta == nilin observertx.Meta == nilin tracker reporterTest plan
🤖 Generated with Claude Code