From 5a7b238093a45b5dfcfb02852d37cb8b7ed8ca83 Mon Sep 17 00:00:00 2001 From: forcodedancing Date: Tue, 18 Jul 2023 17:26:50 +0800 Subject: [PATCH] fix: fix nil validator when publishing message (#356) --- x/slashing/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/slashing/keeper.go b/x/slashing/keeper.go index 48755ce4b..61dfe588f 100644 --- a/x/slashing/keeper.go +++ b/x/slashing/keeper.go @@ -370,7 +370,7 @@ func (k *Keeper) slashingSideDowntime(ctx sdk.Context, pack *SideSlashPackage) s //} k.setValidatorSigningInfo(sideCtx, sideConsAddr, signInfo) - if k.PbsbServer != nil { + if k.PbsbServer != nil && validator != nil { event := SideSlashEvent{ Validator: validator.GetOperator(), InfractionType: Downtime,