node: address stellar watcher review feedback#89
Merged
Conversation
Avoid passing a partially-constructed MessagePublication between functions: parseMessageFromXDR is now a watcher method returning only the parsed event fields, and callers build the complete struct with TxID, timestamp and w.chainID in one place. Consistency level is parsed as uint8 with an explicit overflow check, and publish logs use ZapFields for the common message format. Refs wormhole-foundation#4858 review
Oghma
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses johnsaigle's review comments on wormhole-foundation#4858:
parseMessageFromXDRis now a method on the watcher and returns only the parsed event fields (parsedMessage) instead of a partially-constructedMessagePublication. Callers build the complete struct in one place withTxID, timestamp andw.chainIDset together.consistencyLevelis parsed asuint8with an explicit overflow check — an event whoseconsistency_levelexceedsMaxUint8is rejected with an error instead of silently truncated.MessagePublication.ZapFieldsfor the common log format.TestPollOnce_SkipsConsistencyLevelOverflow.The governor/XRPL changes flagged in the review were rebase contamination and are already gone from the wormhole-foundation#4858 diff after the squash onto current upstream main.
Verified: build,
go vet,gofmtclean; all package tests pass.