Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Fix to return empty array when calling getEvents - Closes #7598 #7604

Merged
merged 3 commits into from
Oct 5, 2022

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented Oct 3, 2022

What was the problem?

This PR resolves #7598

How was it solved?

Update to return empty array when the event does not exist for the height

How was it tested?

send transaction to dpos-mainchain example

./bin/run transaction:send 0a05746f6b656e12087472616e7366657218002080c2d72f2a20a3f96c50d0446220ef2f98240898515cbba8155730679ca35326d98dcfb680f032290a0810000000000000001080c2d72f1a143152da8f438d4591068553438c1a62edc2a161d4220227273a40cbefbdbeda4aa4d41e0a5f2887378ddec84ecf41f1227f029e442a82b3c29b56423c087354378368f719e55b1d8cc5e5ccc6aade8517d854c72799f2ca7cbd01
  • call ./bin/run endpoint:invoke chain_getEvents --pretty '{"height": X }' for both height with event and height without event

@shuse2 shuse2 self-assigned this Oct 3, 2022
@shuse2 shuse2 marked this pull request as ready for review October 3, 2022 17:55
@shuse2 shuse2 requested review from has5aan and mitsuaki-u October 3, 2022 20:56
Copy link
Contributor

@has5aan has5aan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-existent block height results in [ ].
Transaction event for the concerned block height that included the transaction.

@shuse2 shuse2 requested review from mitsuaki-u and has5aan October 4, 2022 16:34
@shuse2 shuse2 force-pushed the 7598-fix_event_endpoint branch from 940a506 to fa475cb Compare October 4, 2022 16:35
@shuse2 shuse2 force-pushed the 7598-fix_event_endpoint branch from fa475cb to 9098b0e Compare October 4, 2022 19:46
@shuse2 shuse2 merged commit 3303c8f into development Oct 5, 2022
@shuse2 shuse2 deleted the 7598-fix_event_endpoint branch October 5, 2022 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPC endpoint chain_getEvents fails to get events by height
3 participants