Skip to content

Commit e5bf2a4

Browse files
authored
Merge pull request #56 from zigbee-alliance/feature/jail-disabling
Disabled jail
2 parents 26a64c5 + 23be30f commit e5bf2a4

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

x/validator/internal/keeper/validator_state_change.go

+15-12
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/cosmos/cosmos-sdk/x/slashing"
2323
abci "github.com/tendermint/tendermint/abci/types"
2424
"github.com/tendermint/tendermint/crypto"
25-
tmtypes "github.com/tendermint/tendermint/types"
2625
"github.com/zigbee-alliance/distributed-compliance-ledger/x/validator/internal/types"
2726
)
2827

@@ -32,20 +31,24 @@ func (k Keeper) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) {
3231
// Iterate over all the validators which *should* have signed this block
3332
// store whether or not they have actually signed it and jail any
3433
// which have missed too many blocks in a window
35-
for _, voteInfo := range req.LastCommitInfo.GetVotes() {
36-
k.HandleValidatorSignature(ctx, voteInfo.Validator.Address, voteInfo.Validator.Power, voteInfo.SignedLastBlock)
37-
}
34+
// nolint: godox
35+
// TODO: Jail is disabled because unjail functionality is not implemented yet.
36+
//for _, voteInfo := range req.LastCommitInfo.GetVotes() {
37+
// k.HandleValidatorSignature(ctx, voteInfo.Validator.Address, voteInfo.Validator.Power, voteInfo.SignedLastBlock)
38+
//}
3839

3940
// Iterate through any newly discovered evidence of infraction
4041
// Slash all validators who contributed to infractions.
41-
for _, evidence := range req.ByzantineValidators {
42-
switch evidence.Type {
43-
case tmtypes.ABCIEvidenceTypeDuplicateVote:
44-
k.HandleDoubleSign(ctx, evidence.Validator.Address, evidence.Height, evidence.Time, evidence.Validator.Power)
45-
default:
46-
k.Logger(ctx).Error(fmt.Sprintf("ignored unknown evidence type: %s", evidence.Type))
47-
}
48-
}
42+
// nolint: godox
43+
// TODO: Jail is disabled because unjail functionality is not implemented yet.
44+
//for _, evidence := range req.ByzantineValidators {
45+
// switch evidence.Type {
46+
// case tmtypes.ABCIEvidenceTypeDuplicateVote:
47+
// k.HandleDoubleSign(ctx, evidence.Validator.Address, evidence.Height, evidence.Time, evidence.Validator.Power)
48+
// default:
49+
// k.Logger(ctx).Error(fmt.Sprintf("ignored unknown evidence type: %s", evidence.Type))
50+
// }
51+
//}
4952
}
5053

5154
// Calculate the ValidatorUpdates for the current block

0 commit comments

Comments
 (0)