mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
grandpa: always store justification for the latest finalized block (#8392)
* grandpa: always store justification for best finalized block * grandpa-warp-sync: add latest justification when finished proving * grandpa-warp-sync: change logic for sending best justification when finished * grandpa: test storing best justification * grandpa: reorder variants in WarpSyncFinished
This commit is contained in:
@@ -451,10 +451,19 @@ fn finalize_3_voters_1_full_observer() {
|
||||
}
|
||||
|
||||
// wait for all finalized on each.
|
||||
let wait_for = futures::future::join_all(finality_notifications)
|
||||
.map(|_| ());
|
||||
let wait_for = futures::future::join_all(finality_notifications).map(|_| ());
|
||||
|
||||
block_until_complete(wait_for, &net, &mut runtime);
|
||||
|
||||
// all peers should have stored the justification for the best finalized block #20
|
||||
for peer_id in 0..4 {
|
||||
let client = net.lock().peers[peer_id].client().as_full().unwrap();
|
||||
let justification = crate::aux_schema::best_justification::<_, Block>(&*client)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(justification.commit.target_number, 20);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user