Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdr: Add wrapper to fetch a ledger's close time #5279

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Apr 16, 2024

What

This introduces a method xdr.LedgerCloseMeta.LedgerCloseTime() which extracts the close time from the structure.

Why

It's annoying and error-prone to dig into the raw structure.

Known limitations

n/a

There are no tests but you can see that this is exactly how it's done, e.g.

https://github.com/stellar/soroban-rpc/blob/638c62d8f58707ec5e079f68b4e6dbf96b94401b/cmd/soroban-rpc/internal/transactions/transactions.go#L119

@Shaptic Shaptic requested a review from a team April 16, 2024 20:35
@Shaptic Shaptic merged commit fd10794 into stellar:master Apr 16, 2024
31 checks passed
@Shaptic Shaptic deleted the txnbuild-ledger-close-time branch April 16, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants