mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 18:35:41 +00:00
Update futures and tokio for browser light client (#673)
* Make availability-store compile for WASM * Use --manifest-path instead * Make validation work on wasm! * Switch to Spawn trait * Migrate validation to std futures * Migrate network to std futures * Final changes to validation * Tidy up network * Tidy up validation * Switch branch * Migrate service * Get polkadot to compile via wasm! * Add browser-demo * Add initial browser file * Add browser-demo * Tidy * Temp switch back to substrate/master * tidy * Fix wasm build * Re-add release flag * Switch to polkadot-master * Revert cli tokio version to avoid libp2p panic * Update tokio version * Fix availability store tests * Fix validation tests * Remove futures01 from availability-store * Fix network tests * Small changes * Fix collator * Fix typo * Revert removal of tokio_executor that causes tokio version mismatch panic * Fix adder test parachain * Revert "Revert removal of tokio_executor that causes tokio version mismatch panic" This reverts commit cfeb50c01d8df5e209483406a711e64761b44ae9. * Update availability-store/src/worker.rs Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Update network/src/lib.rs Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Update network/src/lib.rs Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Box pin changes * Asyncify network functions * Clean up browser validation worker error * Fix av store test * Nits * Fix validation test * Switch favicon * Fix validation test again * Revert "Asyncify network functions" This reverts commit f20ae6548dc482cb1e75bc80641cfe55c6131a53. * Add async blocks back in
This commit is contained in:
@@ -18,9 +18,8 @@
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
use cli::{AbstractService, VersionInfo, TaskExecutor};
|
||||
use futures::channel::oneshot;
|
||||
use futures::{future, FutureExt};
|
||||
use cli::{AbstractService, VersionInfo};
|
||||
use futures::{channel::oneshot, future, FutureExt, task::Spawn};
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
||||
@@ -33,6 +32,7 @@ impl cli::IntoExit for Worker {
|
||||
let (exit_send, exit) = oneshot::channel();
|
||||
|
||||
let exit_send_cell = RefCell::new(Some(exit_send));
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
ctrlc::set_handler(move || {
|
||||
if let Some(exit_send) = exit_send_cell.try_borrow_mut().expect("signal handler not reentrant; qed").take() {
|
||||
exit_send.send(()).expect("Error sending exit notification");
|
||||
@@ -45,13 +45,14 @@ impl cli::IntoExit for Worker {
|
||||
|
||||
impl cli::Worker for Worker {
|
||||
type Work = <Self as cli::IntoExit>::Exit;
|
||||
fn work<S, SC, B, CE>(self, _: &S, _: TaskExecutor) -> Self::Work
|
||||
fn work<S, SC, B, CE, SP>(self, _: &S, _: SP) -> Self::Work
|
||||
where S: AbstractService<Block = service::Block, RuntimeApi = service::RuntimeApi,
|
||||
Backend = B, SelectChain = SC,
|
||||
NetworkSpecialization = service::PolkadotProtocol, CallExecutor = CE>,
|
||||
SC: service::SelectChain<service::Block> + 'static,
|
||||
B: service::Backend<service::Block, service::Blake2Hasher> + 'static,
|
||||
CE: service::CallExecutor<service::Block, service::Blake2Hasher> + Clone + Send + Sync + 'static {
|
||||
CE: service::CallExecutor<service::Block, service::Blake2Hasher> + Clone + Send + Sync + 'static,
|
||||
SP: Spawn + Clone + Send + Sync + 'static {
|
||||
use cli::IntoExit;
|
||||
self.into_exit()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user