-
Notifications
You must be signed in to change notification settings - Fork 40
/
config.go
59 lines (55 loc) · 2.02 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package icsim
import "github.com/icon-project/goloop/icon/icmodule"
type RewardFund struct {
Iglobal int64
Iprep int64
Icps int64
Irelay int64
Ivoter int64
}
type config struct {
TermPeriod int64
MainPRepCount int64
SubPRepCount int64
Irep int64
Rrep int64
BondRequirement int64
UnbondingPeriodMultiplier int64
UnstakeSlotMax int64
LockMinMultiplier int64
LockMaxMultiplier int64
UnbondingMax int64
ValidationPenaltyCondition int
ConsistentValidationPenaltyCondition int64
ConsistentValidationPenaltyMask int64
ConsistentValidationPenaltySlashRatio int
DelegationSlotMax int64
RewardFund
}
func NewConfig() *config {
return &config{
TermPeriod: icmodule.DecentralizedTermPeriod,
MainPRepCount: icmodule.DefaultMainPRepCount,
SubPRepCount: icmodule.DefaultSubPRepCount,
Irep: icmodule.InitialIRep,
Rrep: 0,
BondRequirement: 0,
UnbondingPeriodMultiplier: icmodule.DefaultUnbondingPeriodMultiplier,
UnstakeSlotMax: icmodule.InitialUnstakeSlotMax,
LockMinMultiplier: icmodule.DefaultLockMinMultiplier,
LockMaxMultiplier: icmodule.DefaultLockMaxMultiplier,
UnbondingMax: icmodule.DefaultUnbondingMax,
ValidationPenaltyCondition: icmodule.DefaultValidationPenaltyCondition,
ConsistentValidationPenaltyCondition: icmodule.DefaultConsistentValidationPenaltyCondition,
ConsistentValidationPenaltyMask: icmodule.DefaultConsistentValidationPenaltyMask,
ConsistentValidationPenaltySlashRatio: icmodule.DefaultConsistentValidationPenaltySlashRatio,
DelegationSlotMax: icmodule.DefaultDelegationSlotMax,
RewardFund: RewardFund{
Iglobal: icmodule.DefaultIglobal,
Iprep: icmodule.DefaultIprep,
Ivoter: icmodule.DefaultIvoter,
Icps: icmodule.DefaultIcps,
Irelay: icmodule.DefaultIrelay,
},
}
}