-
Notifications
You must be signed in to change notification settings - Fork 504
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
clients/stellarcore: Add support for Core's new /getledgerentry
HTTP endpoint
#5542
base: master
Are you sure you want to change the base?
Conversation
/getledgerentry
HTTP endpoint
a126a16
to
4db05df
Compare
Looks good! |
@@ -250,6 +250,11 @@ func (c *Client) GetLedgerEntryRaw(ctx context.Context, ledgerSeq uint32, keys . | |||
return resp, c.makeLedgerKeyRequest(ctx, &resp, "getledgerentryraw", ledgerSeq, keys...) | |||
} | |||
|
|||
func (c *Client) GetLedgerEntries(ctx context.Context, ledgerSeq uint32, keys ...xdr.LedgerKey) (*proto.GetLedgerEntryResponse, error) { | |||
var resp *proto.GetLedgerEntryResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var resp *proto.GetLedgerEntryResponse | |
var resp proto.GetLedgerEntryResponse |
I think this should not be a pointer
require.EqualValues(t, "live", resp.Entries[0].State) | ||
require.EqualValues(t, "archived", resp.Entries[1].State) | ||
|
||
key.Type = xdr.LedgerEntryTypeTtl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice coverage on the not so happy path!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just curious, for the new test case did you upgrade captice-core git hash in CI?
What
Add support for Core's
/getledgerentry
as implemented in CAP-66.Why
See #5426