R4R: Tombstone Implementation (#3225)

This commit is contained in:
Sunny Aggarwal
2019-01-10 17:22:49 -08:00
committed by Jack Zampolin
parent 31f61889ff
commit 4aec6cd41c
20 changed files with 157 additions and 574 deletions
+4
View File
@@ -42,6 +42,10 @@ func handleMsgUnjail(ctx sdk.Context, msg MsgUnjail, k Keeper) sdk.Result {
return ErrNoValidatorForAddress(k.codespace).Result()
}
if info.Tombstoned {
return ErrValidatorJailed(k.codespace).Result()
}
// cannot be unjailed until out of jail
if ctx.BlockHeader().Time.Before(info.JailedUntil) {
return ErrValidatorJailed(k.codespace).Result()