-
Notifications
You must be signed in to change notification settings - Fork 811
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
Add test to beacon node fallback feature #6568
Conversation
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.
@chong-he Nice, I've added some comments but looking good!
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.
Thanks @chong-he, looks good to me now.
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.
Cleaner and simpler than I thought it would be! Nice work!
This pull request has merge conflicts. Could you please resolve them @chong-he? 🙏 |
Great work, thanks @chong-he |
Add test to beacon node fallback using mockito crate: https://crates.io/crates/mockito to create mock beacon nodes. The tests include:
update_all_candidates
function inupdate_all_candidates_should_update_sync_status
broadcast
function inbroadcast_should_send_to_all_bns
first_success
function infirst_success_should_try_nodes_in_order
A majority part of the code was written by @jimmygchen, thank you Jimmy for the help and guidance, I learn a lot along the way.