[blockchain] Upgrade tokio

- Also upgrade reqwest
- Switch to `tokio::runtime::Builder::new_single_thread()` because
`tokio::runtime::Runtime::new()` changed it's behavior to create a
multithreaded runtime.
- `enable_all` enables time and io resource drivers as explained
[here](https://docs.rs/tokio/0.2.24/tokio/runtime/index.html#resource-drivers)
This commit is contained in:
Justin Moon
2020-11-17 18:27:01 -06:00
parent 6955a7776d
commit 813c1ddcd0
2 changed files with 4 additions and 4 deletions

View File

@@ -145,7 +145,7 @@ pub fn await_or_block(expr: TokenStream) -> TokenStream {
{
#[cfg(all(not(target_arch = "wasm32"), not(feature = "async-interface")))]
{
tokio::runtime::Runtime::new().unwrap().block_on(#expr)
tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(#expr)
}
#[cfg(any(target_arch = "wasm32", feature = "async-interface"))]