mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
5a66807989
* First take at updating everything to v5 * Patch gRPC gateway to use prysm v5 Fix patch * Update go ssz --------- Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package state_native
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/v5/config/params"
|
|
"github.com/prysmaticlabs/prysm/v5/runtime/version"
|
|
)
|
|
|
|
func (b *BeaconState) ProportionalSlashingMultiplier() (uint64, error) {
|
|
switch b.version {
|
|
case version.Bellatrix, version.Capella, version.Deneb:
|
|
return params.BeaconConfig().ProportionalSlashingMultiplierBellatrix, nil
|
|
case version.Altair:
|
|
return params.BeaconConfig().ProportionalSlashingMultiplierAltair, nil
|
|
case version.Phase0:
|
|
return params.BeaconConfig().ProportionalSlashingMultiplier, nil
|
|
}
|
|
return 0, errNotSupported("ProportionalSlashingMultiplier()", b.version)
|
|
}
|
|
|
|
func (b *BeaconState) InactivityPenaltyQuotient() (uint64, error) {
|
|
switch b.version {
|
|
case version.Bellatrix, version.Capella, version.Deneb:
|
|
return params.BeaconConfig().InactivityPenaltyQuotientBellatrix, nil
|
|
case version.Altair:
|
|
return params.BeaconConfig().InactivityPenaltyQuotientAltair, nil
|
|
case version.Phase0:
|
|
return params.BeaconConfig().InactivityPenaltyQuotient, nil
|
|
}
|
|
return 0, errNotSupported("InactivityPenaltyQuotient()", b.version)
|
|
}
|