Skip to content

node: address stellar watcher review feedback#89

Merged
Oghma merged 1 commit into
stellarfrom
stellar-review-fixes
Jul 23, 2026
Merged

node: address stellar watcher review feedback#89
Oghma merged 1 commit into
stellarfrom
stellar-review-fixes

Conversation

@svlachakis

Copy link
Copy Markdown
Collaborator

Addresses johnsaigle's review comments on wormhole-foundation#4858:

  • parseMessageFromXDR is now a method on the watcher and returns only the parsed event fields (parsedMessage) instead of a partially-constructed MessagePublication. Callers build the complete struct in one place with TxID, timestamp and w.chainID set together.
  • consistencyLevel is parsed as uint8 with an explicit overflow check — an event whose consistency_level exceeds MaxUint8 is rejected with an error instead of silently truncated.
  • Publish logs (poll + reobservation) use MessagePublication.ZapFields for the common log format.
  • New test: 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, gofmt clean; all package tests pass.

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
Oghma merged commit cb21d3a into stellar Jul 23, 2026
32 of 36 checks passed
@Oghma
Oghma deleted the stellar-review-fixes branch July 23, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants