mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 12:15:42 +00:00
Documentation for consensus module (#2043)
* first try * resolve description of grandpa and add links to relevant docs * Update srml/consensus/src/lib.rs Co-Authored-By: AmarRSingh <asinghchrony@protonmail.com> * Can do a relative link here * Update srml/consensus/src/lib.rs Co-Authored-By: AmarRSingh <asinghchrony@protonmail.com> * Update srml/consensus/src/lib.rs Co-Authored-By: AmarRSingh <asinghchrony@protonmail.com> * Update srml/consensus/src/lib.rs Co-Authored-By: AmarRSingh <asinghchrony@protonmail.com> * formatting/style/semantics * missed conflict * style * Update srml/consensus/src/lib.rs * Update srml/consensus/src/lib.rs
This commit is contained in:
@@ -44,6 +44,27 @@ fn authorities_change_logged() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn partial_authorities_change_logged() {
|
||||
with_externalities(&mut new_test_ext(vec![1, 2, 3]), || {
|
||||
System::initialise(&2, &Default::default(), &Default::default());
|
||||
Consensus::set_authorities(&[UintAuthorityId(2), UintAuthorityId(4), UintAuthorityId(5)]);
|
||||
Consensus::on_finalise(2);
|
||||
let header = System::finalise();
|
||||
assert_eq!(header.digest, testing::Digest {
|
||||
logs: vec![
|
||||
generic::DigestItem::AuthoritiesChange(
|
||||
vec![
|
||||
UintAuthorityId(2).into(),
|
||||
UintAuthorityId(4).into(),
|
||||
UintAuthorityId(5).into()
|
||||
]
|
||||
),
|
||||
],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn authorities_change_is_not_logged_when_not_changed() {
|
||||
with_externalities(&mut new_test_ext(vec![1, 2, 3]), || {
|
||||
|
||||
Reference in New Issue
Block a user