session_info: add dispute_period and random_seed (#4547)

This commit is contained in:
Andronik Ordian
2021-12-27 10:03:50 +01:00
committed by GitHub
parent b342ae11d3
commit 9efb223a97
12 changed files with 33 additions and 0 deletions
@@ -65,6 +65,8 @@ pub fn make_session_info() -> SessionInfo {
no_show_slots: 0,
needed_approvals: 0,
active_validator_indices: Vec::new(),
dispute_period: 6,
random_seed: [0u8; 32],
}
}
@@ -221,6 +221,8 @@ impl TestState {
no_show_slots: 0,
needed_approvals: 0,
active_validator_indices: vec![],
dispute_period: 6,
random_seed: [0u8; 32],
}))).unwrap();
}
);
@@ -114,6 +114,8 @@ impl Default for TestState {
no_show_slots: 0,
needed_approvals: 0,
active_validator_indices: vec![],
dispute_period: 6,
random_seed: [0u8; 32],
},
group_rotation_info,
validator_peer_id,
@@ -90,6 +90,8 @@ pub static ref MOCK_SESSION_INFO: SessionInfo =
no_show_slots: 0,
needed_approvals: 0,
active_validator_indices: vec![],
dispute_period: 6,
random_seed: [0u8; 32],
};
/// `SessionInfo` for the second session. (No more validators, but two more authorities.
@@ -110,6 +112,8 @@ pub static ref MOCK_NEXT_SESSION_INFO: SessionInfo =
no_show_slots: 0,
needed_approvals: 0,
active_validator_indices: vec![],
dispute_period: 6,
random_seed: [0u8; 32],
};
}
@@ -1852,5 +1852,7 @@ fn make_session_info(validators: Vec<Pair>, groups: Vec<Vec<u32>>) -> SessionInf
no_show_slots: 0,
needed_approvals: 0,
active_validator_indices: Vec::new(),
dispute_period: 6,
random_seed: [0u8; 32],
}
}