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

chore: Added retry logic #86

Merged
merged 7 commits into from
Apr 21, 2023
Merged

chore: Added retry logic #86

merged 7 commits into from
Apr 21, 2023

Conversation

ChaoticTempest
Copy link
Member

No description provided.

@ChaoticTempest ChaoticTempest requested review from itegulov and removed request for itegulov April 20, 2023 08:07
@ChaoticTempest ChaoticTempest force-pushed the phuong/retry-logic branch 2 times, most recently from 7d18f2e to f388415 Compare April 20, 2023 18:15
@itegulov itegulov marked this pull request as ready for review April 21, 2023 05:59
mpc-recovery/src/leader_node/mod.rs Outdated Show resolved Hide resolved
state.account_creator_id.clone(),
state.account_creator_sk.clone(),
);

state
.client
.register_account(RegisterAccountRequest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this request be insode of the retry block?

Copy link
Member Author

Choose a reason for hiding this comment

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

the retry logic is only meant for sending transactions. The register_account endpoint shouldn't be apart of it and if it fails, should just forward it to the user immediately I think. That's probably for the best UX right now, just so the user can retry themselves for now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Both calls are to the relayer, that is why I do not think that there is lot of differance. But it's not a blocker.

// TODO: use NAR in the future.
//! Separated away from client to distinguish functions that are common and
//! need to be moved eventually into their own separate crate. Not necessarily
//! to be used from workspaces directly even though it is imported from there.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not workspaces anymore :)
Let's mention, that this is the code from workspaces and ideally it should be moved to a separate crate (some kind of near-api-rs) as one effort for workspaces and this project.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I mentioned it was imported from workspaces, and should eventually be moved to near-api-rs (NAR) when it gets created later

@ChaoticTempest ChaoticTempest merged commit 1410250 into develop Apr 21, 2023
@ChaoticTempest ChaoticTempest deleted the phuong/retry-logic branch April 21, 2023 18:30
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.

3 participants