mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +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:
@@ -29,11 +29,9 @@ use primitives::{
|
||||
HeadData, BlockData, Id as ParaId, Message, OutgoingMessages, Status as ParachainStatus,
|
||||
},
|
||||
};
|
||||
use collator::{
|
||||
InvalidHead, ParachainContext, VersionInfo, Network, BuildParachainContext, TaskExecutor,
|
||||
};
|
||||
use collator::{InvalidHead, ParachainContext, VersionInfo, Network, BuildParachainContext};
|
||||
use parking_lot::Mutex;
|
||||
use futures::future::{Ready, ok, err};
|
||||
use futures::{future::{Ready, ok, err}, task::Spawn};
|
||||
|
||||
const GENESIS: AdderHead = AdderHead {
|
||||
number: 0,
|
||||
@@ -108,15 +106,16 @@ impl ParachainContext for AdderContext {
|
||||
impl BuildParachainContext for AdderContext {
|
||||
type ParachainContext = Self;
|
||||
|
||||
fn build<B, E>(
|
||||
fn build<B, E, SP>(
|
||||
self,
|
||||
_: Arc<collator::PolkadotClient<B, E>>,
|
||||
_: TaskExecutor,
|
||||
_: SP,
|
||||
network: Arc<dyn Network>,
|
||||
) -> Result<Self::ParachainContext, ()>
|
||||
where
|
||||
B: client_api::backend::Backend<Block, Blake2Hasher> + 'static,
|
||||
E: client::CallExecutor<Block, Blake2Hasher> + Clone + Send + Sync + 'static
|
||||
E: client::CallExecutor<Block, Blake2Hasher> + Clone + Send + Sync + 'static,
|
||||
SP: Spawn + Clone + Send + Sync + 'static,
|
||||
{
|
||||
Ok(Self { _network: Some(network), ..self })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user