Skip to content

Commit

Permalink
chore(*): bump & fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
appaquet committed Jan 3, 2022
1 parent c048924 commit 205f555
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions clients/web/ts/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ export class MutationBuilder {
return new MutationBuilder(entityId);
}

static deleteEntity(entityId: string): exocore.store.MutationRequest {
return new exocore.store.MutationRequest({
mutations: [
new exocore.store.EntityMutation({
entityId: entityId,
deleteEntity: new exocore.store.DeleteEntityMutation({ entityId: entityId }),
}),
],
});
}

andUpdateEntity(entityId: string): MutationBuilder {
this.entityId = entityId;

Expand Down
9 changes: 8 additions & 1 deletion transport/src/p2p/transport.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::{
num::NonZeroU8,
sync::{Arc, RwLock},
task::{Context, Poll},
};
Expand Down Expand Up @@ -96,6 +97,8 @@ impl Libp2pTransport {
ping: Ping::default(),
};

const DIAL_CONCURRENCY_FACTOR: u8 = 5;

#[cfg(all(feature = "p2p-web", target_arch = "wasm32"))]
let mut swarm = {
use libp2p::wasm_ext::{ffi::websocket_transport, ExtTransport};
Expand All @@ -118,7 +121,10 @@ impl Libp2pTransport {
))
.map(|(peer, muxer), _| (peer, libp2p::core::muxing::StreamMuxerBox::new(muxer)))
.boxed();
Swarm::new(transport, behaviour, *self.local_node.peer_id())

libp2p::swarm::SwarmBuilder::new(transport, behaviour, *self.local_node.peer_id())
.dial_concurrency_factor(NonZeroU8::new(DIAL_CONCURRENCY_FACTOR).unwrap())
.build()
};

#[cfg(feature = "p2p-full")]
Expand All @@ -136,6 +142,7 @@ impl Libp2pTransport {
}

libp2p::swarm::SwarmBuilder::new(transport, behaviour, *self.local_node.peer_id())
.dial_concurrency_factor(NonZeroU8::new(DIAL_CONCURRENCY_FACTOR).unwrap())
.executor(Box::new(CoreExecutor))
.build()
};
Expand Down

0 comments on commit 205f555

Please sign in to comment.