mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-15 09:05:42 +00:00
Finality proof: fetch new authorities set instead of previous one (#4112)
* fetch new authorities set instead of previous one * fixed leftovers + updated test properly * read initial authorities once * updated comment * fix grumbles
This commit is contained in:
committed by
GitHub
parent
e2e2eb7b32
commit
b5f8eb5ac3
@@ -687,7 +687,7 @@ pub mod tests {
|
||||
|
||||
#[test]
|
||||
fn finality_proof_not_required_when_consensus_data_does_not_changes_and_correct_justification_provided() {
|
||||
let justification = TestJustification(true, Vec::new()).encode();
|
||||
let justification = TestJustification((0, vec![(AuthorityId::from_slice(&[1; 32]), 1)]), Vec::new()).encode();
|
||||
assert_eq!(import_block(HashMap::new(), Some(justification)), ImportResult::Imported(ImportedAux {
|
||||
clear_justification_requests: false,
|
||||
needs_justification: false,
|
||||
@@ -714,7 +714,7 @@ pub mod tests {
|
||||
|
||||
#[test]
|
||||
fn finality_proof_required_when_consensus_data_changes_and_incorrect_justification_provided() {
|
||||
let justification = TestJustification(false, Vec::new()).encode();
|
||||
let justification = TestJustification((0, vec![]), Vec::new()).encode();
|
||||
let mut cache = HashMap::new();
|
||||
cache.insert(well_known_cache_keys::AUTHORITIES, vec![AuthorityId::from_slice(&[2; 32])].encode());
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user