Skip to content

Commit

Permalink
enable self-delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
chmllr committed Jan 10, 2025
1 parent 9059d5a commit efd651f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions halo/evmstaking2/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ func (k Keeper) deliverDelegate(ctx context.Context, ev *bindings.StakingDelegat
"validator", ev.Validator.Hex(),
"amount", ev.Amount.String())

// Validator already exists, add deposit to self delegation
msg := stypes.NewMsgDelegate(delAddr.String(), valAddr.String(), amountCoin)
_, err := k.sServer.Delegate(ctx, msg)
if err != nil {
Expand Down Expand Up @@ -316,10 +315,6 @@ func (k Keeper) deliverCreateValidator(ctx context.Context, createValidator *bin
}

func verifyStakingDelegate(delegate *bindings.StakingDelegate) error {
if delegate.Delegator != delegate.Validator {
return errors.New("only self delegation")
}

if delegate.Amount == nil {
return errors.New("stake amount missing")
}
Expand Down

0 comments on commit efd651f

Please sign in to comment.