-
Notifications
You must be signed in to change notification settings - Fork 10
/
slashing.go
49 lines (37 loc) · 1.3 KB
/
slashing.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
package stakingadapter
import (
"time"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
)
var _ evidencetypes.SlashingKeeper = &SlashingAdapter{}
type SlashingAdapter struct{}
func (s SlashingAdapter) GetPubkey(ctx sdk.Context, address cryptotypes.Address) (cryptotypes.PubKey, error) {
log(ctx, "GetPubkey")
return nil, ErrNotImplemented
}
func (s SlashingAdapter) IsTombstoned(ctx sdk.Context, address sdk.ConsAddress) bool {
log(ctx, "IsTombstoned")
return false
}
func (s SlashingAdapter) HasValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress) bool {
log(ctx, "HasValidatorSigningInfo")
return false
}
func (s SlashingAdapter) Tombstone(ctx sdk.Context, address sdk.ConsAddress) {
log(ctx, "Tombstone")
}
func (s SlashingAdapter) Slash(ctx sdk.Context, address sdk.ConsAddress, dec sdk.Dec, i int64, i2 int64) {
log(ctx, "Slash")
}
func (s SlashingAdapter) SlashFractionDoubleSign(ctx sdk.Context) sdk.Dec {
log(ctx, "SlashFractionDoubleSign")
return sdk.ZeroDec()
}
func (s SlashingAdapter) Jail(ctx sdk.Context, address sdk.ConsAddress) {
log(ctx, "Jail")
}
func (s SlashingAdapter) JailUntil(ctx sdk.Context, address sdk.ConsAddress, time time.Time) {
log(ctx, "JailUntil")
}