mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 19:25:55 +00:00
Fixes paint-authority-discovery build and remove warnings (#4111)
This commit is contained in:
@@ -12,7 +12,7 @@ primitives = { package = "substrate-primitives", path = "../../primitives/core"
|
|||||||
rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false }
|
rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false }
|
||||||
serde = { version = "1.0.101", optional = true }
|
serde = { version = "1.0.101", optional = true }
|
||||||
runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false }
|
runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false }
|
||||||
session = { package = "paint-session", path = "../session", default-features = false }
|
session = { package = "paint-session", path = "../session", default-features = false, features = [ "historical" ] }
|
||||||
sr-primitives = { path = "../../primitives/sr-primitives", default-features = false }
|
sr-primitives = { path = "../../primitives/sr-primitives", default-features = false }
|
||||||
support = { package = "paint-support", path = "../support", default-features = false }
|
support = { package = "paint-support", path = "../support", default-features = false }
|
||||||
system = { package = "paint-system", path = "../system", default-features = false }
|
system = { package = "paint-system", path = "../system", default-features = false }
|
||||||
|
|||||||
@@ -198,12 +198,6 @@ mod tests {
|
|||||||
.map(AuthorityId::from)
|
.map(AuthorityId::from)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// Needed for `session::OneSessionHandler::on_new_session`.
|
|
||||||
let first_authorities_and_account_ids: Vec<(&AuthorityId, AuthorityId)> = first_authorities.clone()
|
|
||||||
.into_iter()
|
|
||||||
.map(|id| (&account_id, id))
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
let second_authorities: Vec<AuthorityId> = vec![2, 3].into_iter()
|
let second_authorities: Vec<AuthorityId> = vec![2, 3].into_iter()
|
||||||
.map(|i| AuthorityPair::from_seed_slice(vec![i; 32].as_ref()).unwrap().public())
|
.map(|i| AuthorityPair::from_seed_slice(vec![i; 32].as_ref()).unwrap().public())
|
||||||
.map(AuthorityId::from)
|
.map(AuthorityId::from)
|
||||||
@@ -235,10 +229,7 @@ mod tests {
|
|||||||
AuthorityDiscovery::on_genesis_session(
|
AuthorityDiscovery::on_genesis_session(
|
||||||
first_authorities.iter().map(|id| (id, id.clone()))
|
first_authorities.iter().map(|id| (id, id.clone()))
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(first_authorities, AuthorityDiscovery::authorities());
|
||||||
first_authorities,
|
|
||||||
AuthorityDiscovery::authorities()
|
|
||||||
);
|
|
||||||
|
|
||||||
// When `changed` set to false, the authority set should not be updated.
|
// When `changed` set to false, the authority set should not be updated.
|
||||||
AuthorityDiscovery::on_new_session(
|
AuthorityDiscovery::on_new_session(
|
||||||
@@ -246,10 +237,7 @@ mod tests {
|
|||||||
second_authorities_and_account_ids.clone().into_iter(),
|
second_authorities_and_account_ids.clone().into_iter(),
|
||||||
vec![].into_iter(),
|
vec![].into_iter(),
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(first_authorities, AuthorityDiscovery::authorities());
|
||||||
first_authorities,
|
|
||||||
AuthorityDiscovery::authorities()
|
|
||||||
);
|
|
||||||
|
|
||||||
// When `changed` set to true, the authority set should be updated.
|
// When `changed` set to true, the authority set should be updated.
|
||||||
AuthorityDiscovery::on_new_session(
|
AuthorityDiscovery::on_new_session(
|
||||||
@@ -257,10 +245,7 @@ mod tests {
|
|||||||
second_authorities_and_account_ids.into_iter(),
|
second_authorities_and_account_ids.into_iter(),
|
||||||
vec![].into_iter(),
|
vec![].into_iter(),
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(second_authorities, AuthorityDiscovery::authorities());
|
||||||
second_authorities,
|
|
||||||
AuthorityDiscovery::authorities()
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user