-
Notifications
You must be signed in to change notification settings - Fork 502
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
services/horizon: Improve transaction precondition
omitempty
behavi…
…or (#4360) * Omit max_ledger when it's 0 * Drops minSeqAge from response when it's 0: Because we use a string for the field (to work around languages that don't natively support uint64 values) in the JSON response, but the field is a non-pointer in the XDR, it will always be set and will be 0 by default. Since it's a duration, 0 is effectively "not set", and so it should be omitted from the resulting precondition. Caveat: if someone explicitly sets it to 0 when building their tx, this is equivalent to not setting it, so they may be confused about its omission, but this is working as intended.
- Loading branch information
Showing
5 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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