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

Upgrade to tokio 1.0 #20

Merged
merged 2 commits into from
Jan 22, 2021
Merged

Upgrade to tokio 1.0 #20

merged 2 commits into from
Jan 22, 2021

Conversation

rishflab
Copy link
Contributor

Need this to get the tests in xmd-btc swapping after the Tokio 1.0 upgrade

@rishflab rishflab requested review from D4nte, luckysori and thomaseizinger and removed request for D4nte and luckysori January 16, 2021 02:08
Cargo.toml Outdated
@@ -14,13 +14,13 @@ bitcoin = { version = "0.25", features = ["use-serde"] }
bitcoincore-rpc-json = "0.12"
futures = "0.3.5"
hex = "0.4.2"
jsonrpc_client = { git = "https://github.com/thomaseizinger/rust-jsonrpc-client", rev = "c7010817e0f86ab24b3dc10d6bb0463faa0aace4", features = ["reqwest"] }
reqwest = { version = "0.10", default-features = false, features = ["json", "native-tls"] }
jsonrpc_client = { git = "https://github.com/thomaseizinger/rust-jsonrpc-client", rev = "f60c839481c1ac68909ada0141a3a3bf085bb1af", features = ["reqwest"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

I've released the lib to crates.io a couple of days ago :)

You can just depend on that instead of the Git rev!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm release 0.4 doesn't not build because it is using request 0.10. 0.11 is needed.
the trait bound `reqwest::Client: jsonrpc_client::SendRequest` is not satisfied --> src/bitcoind_rpc.rs:18:1 | 18 | #[jsonrpc_client::implement(BitcoindRpcApi)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `jsonrpc_client::SendRequest` is not implemented for `reqwest::Client` | = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, use release 0.5 then? :)

That one depends on reqwest 0.11

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

did not know/see there was a 0.5 release.

@thomaseizinger
Copy link
Contributor

Also, unless each commit builds in isolation, you might want to squash these together!

Upgrade jsonrpc_client to version that uses reqwest 0.11 and tokio 1.0.

Fix tests
@D4nte
Copy link
Contributor

D4nte commented Jan 21, 2021

@rishflab do you have rights to merge?

@thomaseizinger
Copy link
Contributor

Note: There is still a comment that could be actioned before merging.

@rishflab
Copy link
Contributor Author

@rishflab do you have rights to merge?

nope, not an authorised user

@D4nte D4nte merged commit 195af0b into master Jan 22, 2021
@D4nte D4nte deleted the upgrade-tokio-1 branch January 22, 2021 02:51
bors bot added a commit to comit-network/xmr-btc-swap that referenced this pull request Jan 29, 2021
143: Upgrade to tokio 1.0 r=D4nte a=rishflab

When we were refactoring tests we realised we probably want the ability to abort a `tokio::JoinHandle` to kill the `EventLoop` to simulate a real world crash. tokio 1.0 is needed for this. It is probably about time to upgrade tokio anyway. 

In order to upgrade to tokio 1.0 the following dependencies were also upgraded in the swap crate and monero-harness-rs
* backoff
* libp2p
* request

UPDATE: This should be merged until the following dependencies are uprgraded to Tokio 1.0 or Tokio compat  is used

- [x] bitcoin-harness-rs coblox/bitcoin-harness-rs#20

Co-authored-by: rishflab <rishflab@hotmail.com>
Co-authored-by: Franck Royer <franck@coblox.tech>
abraham-nixon added a commit to abraham-nixon/xmr-btc-swap that referenced this pull request Feb 15, 2022
143: Upgrade to tokio 1.0 r=D4nte a=rishflab

When we were refactoring tests we realised we probably want the ability to abort a `tokio::JoinHandle` to kill the `EventLoop` to simulate a real world crash. tokio 1.0 is needed for this. It is probably about time to upgrade tokio anyway. 

In order to upgrade to tokio 1.0 the following dependencies were also upgraded in the swap crate and monero-harness-rs
* backoff
* libp2p
* request

UPDATE: This should be merged until the following dependencies are uprgraded to Tokio 1.0 or Tokio compat  is used

- [x] bitcoin-harness-rs coblox/bitcoin-harness-rs#20

Co-authored-by: rishflab <rishflab@hotmail.com>
Co-authored-by: Franck Royer <franck@coblox.tech>
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.

None yet

4 participants