mirror of
https://github.com/serai-dex/serai.git
synced 2025-02-03 19:56:36 +00:00
Fix test
This commit is contained in:
parent
079eee931a
commit
3b2352baed
1 changed files with 3 additions and 3 deletions
|
@ -26,14 +26,14 @@ impl Weights for TestWeights {
|
||||||
type ValidatorId = TestValidatorId;
|
type ValidatorId = TestValidatorId;
|
||||||
|
|
||||||
fn total_weight(&self) -> u64 {
|
fn total_weight(&self) -> u64 {
|
||||||
5
|
4
|
||||||
}
|
}
|
||||||
fn weight(&self, id: TestValidatorId) -> u64 {
|
fn weight(&self, id: TestValidatorId) -> u64 {
|
||||||
[1, 1, 1, 1, 1][usize::try_from(id).unwrap()]
|
[1; 4][usize::try_from(id).unwrap()]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn proposer(&self, number: BlockNumber, round: Round) -> TestValidatorId {
|
fn proposer(&self, number: BlockNumber, round: Round) -> TestValidatorId {
|
||||||
TestValidatorId::try_from((number.0 + u32::from(round.0)) % 5).unwrap()
|
TestValidatorId::try_from((number.0 + u32::from(round.0)) % 4).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue