Skip to content

Slot change subscribe and unsubscribe - #87

Open
pratyaxsh wants to merge 2 commits into
mschneider:mainfrom
pratyaxsh:slotChange
Open

pratyaxsh wants to merge 2 commits into
mschneider:mainfrom
pratyaxsh:slotChange

Conversation

@pratyaxsh

Copy link
Copy Markdown
Collaborator

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.

Comment thread lib/solana.cpp
Callback on_subscibe,
Callback on_unsubscribe) {
// create parameters using the user provided input
json param = json::array();

Copy link
Copy Markdown
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.

Comment thread tests/main.cpp
};
int sub_id = sub.onSlotChange(on_callback, solana::Commitment::CONFIRMED,
on_subscribe, on_unsubscribe);
sleep(10);

Copy link
Copy Markdown
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