diff --git a/x/keyshare/keeper/msg_server_send_keyshare.go b/x/keyshare/keeper/msg_server_send_keyshare.go index d7951f69..b35c781a 100644 --- a/x/keyshare/keeper/msg_server_send_keyshare.go +++ b/x/keyshare/keeper/msg_server_send_keyshare.go @@ -28,6 +28,10 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar return nil, types.ErrValidatorNotRegistered.Wrap(msg.Creator) } + if uint64(ctx.BlockHeight()) > msg.BlockHeight { + return nil, types.ErrInvalidBlockHeight.Wrapf("Expected height: %d, got: %d", ctx.BlockHeight(), msg.BlockHeight) + } + // Setup suite := bls.NewBLS12381Suite() ibeID := strconv.FormatUint(msg.BlockHeight, 10)