[devp2p] Update to 2018 edition (#10716)
* Run cargo fix * Optimize imports * compiles * cleanup * Use Secret to store mac-key Truncate payload properly * cleanup * Reorg imports * brwchk hand waving * Fix a bunch of imports * Fixup imports * Sort * indentation * WIP * Revert "WIP" This reverts commit 85f7e74f4bd1990db865cf6acfa8d494798eeeaa. * inclusive range pattern syntax is changing * remove usless todo
This commit is contained in:
@@ -14,26 +14,20 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
extern crate env_logger;
|
||||
extern crate ethcore_io as io;
|
||||
extern crate ethcore_network;
|
||||
extern crate ethcore_network_devp2p;
|
||||
extern crate ethkey;
|
||||
extern crate parity_bytes;
|
||||
extern crate parking_lot;
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering};
|
||||
use std::sync::{
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering as AtomicOrdering}
|
||||
};
|
||||
use std::thread;
|
||||
use std::time::*;
|
||||
use std::time::Duration;
|
||||
|
||||
use parity_bytes::Bytes;
|
||||
use parking_lot::Mutex;
|
||||
|
||||
use ethcore_network::*;
|
||||
use network::{PeerId, NetworkContext, NetworkProtocolHandler, NetworkConfiguration};
|
||||
use ethcore_network_devp2p::NetworkService;
|
||||
use ethkey::{Generator, Random};
|
||||
use io::TimerToken;
|
||||
use ethcore_io::TimerToken;
|
||||
|
||||
pub struct TestProtocol {
|
||||
drop_session: bool,
|
||||
@@ -48,7 +42,7 @@ impl TestProtocol {
|
||||
packet: Mutex::new(Vec::new()),
|
||||
got_timeout: AtomicBool::new(false),
|
||||
got_disconnect: AtomicBool::new(false),
|
||||
drop_session: drop_session,
|
||||
drop_session,
|
||||
}
|
||||
}
|
||||
/// Creates and register protocol with the network service
|
||||
|
||||
Reference in New Issue
Block a user