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

[r2r] get_current_mtp rpc impl #1340

Merged
merged 10 commits into from
Jul 27, 2022
Merged

[r2r] get_current_mtp rpc impl #1340

merged 10 commits into from
Jul 27, 2022

Conversation

borngraced
Copy link
Member

@borngraced borngraced commented Jul 13, 2022

@borngraced borngraced requested a review from shamardy July 13, 2022 12:30
@borngraced borngraced self-assigned this Jul 13, 2022
@borngraced borngraced changed the title [r2r] get_current_mtp rpc impl [wip] get_current_mtp rpc impl Jul 13, 2022
@borngraced
Copy link
Member Author

@shamardy this PR is ready for review

@borngraced borngraced changed the title [wip] get_current_mtp rpc impl [r2r] get_current_mtp rpc impl Jul 13, 2022
@borngraced borngraced linked an issue Jul 13, 2022 that may be closed by this pull request
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

Thanks for the fast PR! First review iteration.

fn status_code(&self) -> StatusCode {
match self {
GetCurrentMtpError::Internal(_) => StatusCode::INTERNAL_SERVER_ERROR,
GetCurrentMtpError::NotSupported(_) => StatusCode::INTERNAL_SERVER_ERROR,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment on lines 50 to 52
let coin = lp_coinfind_or_err(&ctx, &req.coin).await?;

match coin {
Copy link
Collaborator

Choose a reason for hiding this comment

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

mm2src/coins/rpc_command/get_current_mtp.rs Outdated Show resolved Hide resolved
mm2src/coins/rpc_command/get_current_mtp.rs Outdated Show resolved Hide resolved
mm2src/coins/rpc_command/get_current_mtp.rs Outdated Show resolved Hide resolved
mm2src/mm2_main/src/docker_tests.rs Outdated Show resolved Hide resolved
@borngraced borngraced changed the title [r2r] get_current_mtp rpc impl [wip] get_current_mtp rpc impl Jul 13, 2022
@borngraced borngraced changed the title [wip] get_current_mtp rpc impl [r2r] get_current_mtp rpc impl Jul 14, 2022
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

Second review iteration

mm2src/coins/rpc_command/get_current_mtp.rs Outdated Show resolved Hide resolved
mm2src/coins/rpc_command/get_current_mtp.rs Outdated Show resolved Hide resolved
mm2src/coins/rpc_command/get_current_mtp.rs Outdated Show resolved Hide resolved
@borngraced
Copy link
Member Author

@shamardy this is ready for review. thanks

Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

Only one more minor fix 🙂

mm2src/coins/rpc_command/get_current_mtp.rs Outdated Show resolved Hide resolved
@borngraced
Copy link
Member Author

borngraced commented Jul 16, 2022 via email

shamardy
shamardy previously approved these changes Jul 18, 2022
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

LGTM!

@shamardy
Copy link
Collaborator

@sergeyboyko0791 can you please have a look at this PR too?

Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

Great job!
Only decorative remarks

mm2src/mm2_main/src/mm2_tests.rs Outdated Show resolved Hide resolved
mm2src/mm2_main/src/mm2_tests.rs Outdated Show resolved Hide resolved
Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

🔥

]);
let passphrase = "cMhHM3PMpMrChygR4bLF7QsTdenhWpFrrmf2UezBG3eeFsz41rtL";

let conf = Mm2TestConf::seednode(&passphrase, &coins);

Choose a reason for hiding this comment

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

I think it's overhead to run a seednode in this test.
Seednode opens a server socket and listens for incoming P2P connections.
But anyway it's not critical now

@sergeyboyko0791 sergeyboyko0791 merged commit ac57077 into dev Jul 27, 2022
@sergeyboyko0791 sergeyboyko0791 deleted the get_current_mtp_rpc branch July 27, 2022 13:25
@borngraced borngraced mentioned this pull request Feb 17, 2023
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.

add get_current_mtp API call
3 participants