Skip to content

Commit

Permalink
Merge pull request #11594 from vegaprotocol/11588-fix-panic
Browse files Browse the repository at this point in the history
fix: actually set err so that the defer to cleanup after amend runs
  • Loading branch information
jeremyletang authored Aug 16, 2024
2 parents f9a5a29 + 75fd32c commit ff286ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/execution/future/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -5589,7 +5589,8 @@ func (m *Market) AmendAMM(ctx context.Context, amend *types.AmendAMM, determinis
m.log.Panic("unable to restore AMM balances after failed amend", logging.Error(err))
}
}
return common.ErrAMMCannotRebase
err = common.ErrAMMCannotRebase // set it to err so that the defer runs
return err
}

m.amm.Confirm(ctx, pool)
Expand Down

0 comments on commit ff286ba

Please sign in to comment.