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

Slot change subscribe and unsubscribe #87

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pSN0W
Copy link
Collaborator

@pSN0W pSN0W commented Nov 29, 2022

This pull request implements the onSlotChange and removeSlotChangeListener function related to issue number #41. The goal here is to get notification every time a slot is changed.

Callback on_subscibe,
Callback on_unsubscribe) {
// create parameters using the user provided input
json param = json::array();
Copy link
Collaborator

Choose a reason for hiding this comment

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

param should be an input to this method.

};
int sub_id = sub.onSlotChange(on_callback, solana::Commitment::CONFIRMED,
on_subscribe, on_unsubscribe);
sleep(10);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Avoid sleep at all costs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants