Skip to content

Commit

Permalink
Add check on submitted keyshare height #55
Browse files Browse the repository at this point in the history
  • Loading branch information
p0p3yee committed Jun 30, 2023
1 parent 3744374 commit 257f890
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/keyshare/keeper/msg_server_send_keyshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 257f890

Please sign in to comment.