mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 06:11:07 +00:00
session_info: add dispute_period and random_seed (#4547)
This commit is contained in:
@@ -686,6 +686,8 @@ pub(crate) mod tests {
|
||||
no_show_slots: index as _,
|
||||
needed_approvals: index as _,
|
||||
active_validator_indices: Vec::new(),
|
||||
dispute_period: 6,
|
||||
random_seed: [0u8; 32],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1142,6 +1144,8 @@ pub(crate) mod tests {
|
||||
n_delay_tranches: irrelevant,
|
||||
no_show_slots: irrelevant,
|
||||
active_validator_indices: Vec::new(),
|
||||
dispute_period: 6,
|
||||
random_seed: [0u8; 32],
|
||||
};
|
||||
|
||||
let slot = Slot::from(10);
|
||||
|
||||
@@ -753,6 +753,8 @@ fn session_info(keys: &[Sr25519Keyring]) -> SessionInfo {
|
||||
n_delay_tranches: 50,
|
||||
no_show_slots: 2,
|
||||
active_validator_indices: vec![],
|
||||
dispute_period: 6,
|
||||
random_seed: [0u8; 32],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -317,6 +317,8 @@ impl TestState {
|
||||
no_show_slots: 1,
|
||||
needed_approvals: 10,
|
||||
active_validator_indices: Vec::new(),
|
||||
dispute_period: 6,
|
||||
random_seed: [0u8; 32],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -512,6 +512,8 @@ fn dummy_session_info() -> SessionInfo {
|
||||
no_show_slots: 0u32,
|
||||
needed_approvals: 1u32,
|
||||
active_validator_indices: vec![],
|
||||
dispute_period: 6,
|
||||
random_seed: [0u8; 32],
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
|
||||
@@ -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],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,6 +292,8 @@ mod tests {
|
||||
no_show_slots: index as _,
|
||||
needed_approvals: index as _,
|
||||
active_validator_indices: Vec::new(),
|
||||
dispute_period: 6,
|
||||
random_seed: [0u8; 32],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user