mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-27 13:55:43 +00:00
Bumped devp2p (#116)
This commit is contained in:
committed by
Robert Habermeier
parent
b3dd4e74fd
commit
f72e9e7e13
@@ -18,6 +18,7 @@ serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
futures = "0.1.17"
|
||||
ethcore-network = { git = "https://github.com/paritytech/parity.git" }
|
||||
ethcore-network-devp2p = { git = "https://github.com/paritytech/parity.git" }
|
||||
ethcore-io = { git = "https://github.com/paritytech/parity.git" }
|
||||
ed25519 = { path = "../../substrate/ed25519" }
|
||||
substrate-primitives = { path = "../../substrate/primitives" }
|
||||
|
||||
@@ -36,20 +36,20 @@ pub trait SyncIo {
|
||||
}
|
||||
|
||||
/// Wraps `NetworkContext` and the blockchain client
|
||||
pub struct NetSyncIo<'s, 'h> where 'h: 's {
|
||||
network: &'s NetworkContext<'h>,
|
||||
pub struct NetSyncIo<'s> {
|
||||
network: &'s NetworkContext,
|
||||
}
|
||||
|
||||
impl<'s, 'h> NetSyncIo<'s, 'h> {
|
||||
impl<'s> NetSyncIo<'s> {
|
||||
/// Creates a new instance from the `NetworkContext` and the blockchain client reference.
|
||||
pub fn new(network: &'s NetworkContext<'h>) -> NetSyncIo<'s, 'h> {
|
||||
pub fn new(network: &'s NetworkContext) -> NetSyncIo<'s> {
|
||||
NetSyncIo {
|
||||
network: network,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s, 'h> SyncIo for NetSyncIo<'s, 'h> {
|
||||
impl<'s> SyncIo for NetSyncIo<'s> {
|
||||
fn disable_peer(&mut self, peer_id: PeerId) {
|
||||
self.network.disable_peer(peer_id);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
//! Implements polkadot protocol version as specified here:
|
||||
//! https://github.com/paritytech/polkadot/wiki/Network-protocol
|
||||
|
||||
extern crate ethcore_network_devp2p as network_devp2p;
|
||||
extern crate ethcore_network as network;
|
||||
extern crate ethcore_io as core_io;
|
||||
extern crate rand;
|
||||
@@ -61,7 +62,8 @@ pub mod error;
|
||||
pub use service::{Service, FetchFuture, StatementStream, ConsensusService, BftMessageStream, TransactionPool, Params, ManageNetwork};
|
||||
pub use protocol::{ProtocolStatus};
|
||||
pub use sync::{Status as SyncStatus, SyncState};
|
||||
pub use network::{NonReservedPeerMode, ConnectionFilter, ConnectionDirection, NetworkConfiguration};
|
||||
pub use network::{NonReservedPeerMode, NetworkConfiguration};
|
||||
pub use network_devp2p::{ConnectionFilter, ConnectionDirection};
|
||||
pub use message::{Statement, BftMessage, LocalizedBftMessage, ConsensusVote, SignedConsensusVote, SignedConsensusMessage, SignedConsensusProposal};
|
||||
pub use error::Error;
|
||||
pub use config::{Role, ProtocolConfig};
|
||||
|
||||
@@ -18,8 +18,9 @@ use std::sync::Arc;
|
||||
use std::collections::{BTreeMap};
|
||||
use std::io;
|
||||
use futures::sync::{oneshot, mpsc};
|
||||
use network::{NetworkProtocolHandler, NetworkService, NetworkContext, HostInfo, PeerId, ProtocolId,
|
||||
use network::{NetworkProtocolHandler, NetworkContext, HostInfo, PeerId, ProtocolId,
|
||||
NetworkConfiguration , NonReservedPeerMode, ErrorKind};
|
||||
use network_devp2p::{NetworkService};
|
||||
use primitives::block::{TransactionHash, Header};
|
||||
use primitives::Hash;
|
||||
use core_io::{TimerToken};
|
||||
|
||||
Reference in New Issue
Block a user