forked from ghostchain/ghost-node
make multiplication to round up during slash fraction calculation
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
6419d4ba16
commit
8252107e96
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-slow-clap"
|
name = "ghost-slow-clap"
|
||||||
version = "0.4.28"
|
version = "0.4.29"
|
||||||
description = "Applause protocol for the EVM bridge"
|
description = "Applause protocol for the EVM bridge"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
|||||||
@ -1637,7 +1637,7 @@ impl<Offender: Clone> Offence<Offender> for SlowClapOffence<Offender> {
|
|||||||
missed_percent.saturating_mul(Perbill::from_rational(1, offenders_count))
|
missed_percent.saturating_mul(Perbill::from_rational(1, offenders_count))
|
||||||
}
|
}
|
||||||
OffenceType::CommitmentOffence => offenders_count
|
OffenceType::CommitmentOffence => offenders_count
|
||||||
.checked_sub(Perbill::from_percent(9).mul_ceil(self.validator_set_count))
|
.checked_sub(Perbill::from_percent(9).mul_floor(self.validator_set_count))
|
||||||
.map(|threshold| {
|
.map(|threshold| {
|
||||||
Perbill::from_rational(threshold.saturating_mul(4), self.validator_set_count)
|
Perbill::from_rational(threshold.saturating_mul(4), self.validator_set_count)
|
||||||
.square()
|
.square()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user