Commit d41d65b1 authored by Cecile Tonglet's avatar Cecile Tonglet
Browse files

Merge commit 36e9d17e (conflicts)

Parent branch: origin/master
Forked at: 77de8b91
parents 09cb3f1b 36e9d17e
......@@ -3447,6 +3447,7 @@ name = "pallet-collective"
version = "2.0.0-alpha.5"
source = "git+https://github.com/paritytech/substrate#41ded05195e6422746d6efbf433eaa65bf0557d7"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"parity-scale-codec",
......
......@@ -43,7 +43,7 @@ async fn start_inner(chain_spec: String, log_level: String) -> Result<Client, Bo
info!(" by Parity Technologies, 2017-2020");
info!("📋 Chain specification: {}", config.chain_spec.name());
info!("🏷 Node name: {}", config.network.node_name);
info!("👤 Roles: {}", config.roles);
info!("👤 Role: {}", config.display_role());
// Create the service. This is the most heavy initialization step.
let service = service::kusama_new_light(config)
......
......@@ -635,7 +635,7 @@ impl<C: ChainContext + ?Sized> MessageValidator<C> {
}
impl<C: ChainContext + ?Sized> sc_network_gossip::Validator<Block> for MessageValidator<C> {
fn new_peer(&self, _context: &mut dyn ValidatorContext<Block>, who: &PeerId, _roles: ObservedRole) {
fn new_peer(&self, _context: &mut dyn ValidatorContext<Block>, who: &PeerId, _role: ObservedRole) {
let mut inner = self.inner.write();
inner.peers.insert(who.clone(), PeerData::default());
}
......
......@@ -891,8 +891,8 @@ impl<Api, Sp, Gossip> Worker<Api, Sp, Gossip> where
fn handle_service_message(&mut self, message: ServiceToWorkerMsg) {
match message {
ServiceToWorkerMsg::PeerConnected(remote, roles) => {
self.protocol_handler.on_connect(remote, roles);
ServiceToWorkerMsg::PeerConnected(remote, role) => {
self.protocol_handler.on_connect(remote, role);
}
ServiceToWorkerMsg::PeerDisconnected(remote) => {
self.protocol_handler.on_disconnect(remote);
......
......@@ -189,8 +189,8 @@ sp_api::mock_impl_runtime_apis! {
}
impl super::Service<MockNetworkOps> {
async fn connect_peer(&mut self, peer: PeerId, roles: ObservedRole) {
self.sender.send(ServiceToWorkerMsg::PeerConnected(peer, roles)).await.unwrap();
async fn connect_peer(&mut self, peer: PeerId, role: ObservedRole) {
self.sender.send(ServiceToWorkerMsg::PeerConnected(peer, role)).await.unwrap();
}
async fn peer_message(&mut self, peer: PeerId, message: Message) {
......@@ -591,7 +591,7 @@ fn validator_sends_key_to_collator_on_status() {
pool.spawner().spawn_local(worker_task).unwrap();
pool.run_until(async move {
service_clone.synchronize(move |proto| { proto.local_keys.insert(validator_id_clone); }).await;
service_clone.connect_peer(peer_clone.clone(), Roles::AUTHORITY).await;
service_clone.connect_peer(peer_clone.clone(), ObservedRole::Authority).await;
service_clone.peer_message(peer_clone.clone(), Message::Status(Status {
version: VERSION,
collating_for: Some((collator_id, para_id)),
......
......@@ -78,5 +78,6 @@ std = [
runtime-benchmarks = [
"libsecp256k1/hmac",
"frame-benchmarking",
"frame-support/runtime-benchmarks"
"frame-support/runtime-benchmarks",
"system/runtime-benchmarks",
]
......@@ -642,6 +642,7 @@ mod benchmarking {
use super::*;
use secp_utils::*;
use system::RawOrigin;
use system as frame_system; // NOTE: required for the benchmarks! macro
use frame_benchmarking::{benchmarks, account};
use sp_runtime::DispatchResult;
use sp_runtime::traits::ValidateUnsigned;
......
......@@ -139,8 +139,11 @@ std = [
"runtime-common/std",
]
runtime-benchmarks = [
"collective/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"elections-phragmen/runtime-benchmarks"
"elections-phragmen/runtime-benchmarks",
"society/runtime-benchmarks",
"system/runtime-benchmarks",
]
......@@ -133,8 +133,10 @@ std = [
"vesting/std",
]
runtime-benchmarks = [
"collective/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"elections-phragmen/runtime-benchmarks"
"elections-phragmen/runtime-benchmarks",
"system/runtime-benchmarks",
]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment