Skip to content

Commit

Permalink
Merge pull request #11386 from vegaprotocol/11380
Browse files Browse the repository at this point in the history
fix: handle missing order submission in stop order
  • Loading branch information
ze97286 authored Jun 17, 2024
2 parents ece41a5 + 95a7f70 commit 49965dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- [11319](https://github.com/vegaprotocol/vega/issues/11319) - Do not leak Ethereum client secrets in the logs.
- [11336](https://github.com/vegaprotocol/vega/issues/11336) - Add support for decay factor in governance recurring transfers and report the proposal amount rather than 0 when the proposal gets enacted.
- [11368](https://github.com/vegaprotocol/vega/issues/11368) - Add support for update vesting stats in REST API and fix summing the quantum balance for vesting stats.
- [11380](https://github.com/vegaprotocol/vega/issues/11380) - Handle broken stop orders in prepare proposal.
- [11136](https://github.com/vegaprotocol/vega/issues/11136) - Fix premature invocation of post commit hooks in case of fee stats event.

## 0.76.1
Expand Down
4 changes: 2 additions & 2 deletions core/processor/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -1127,12 +1127,12 @@ func (app *App) prepareProposal(height uint64, txs []abci.Tx, rawTxs [][]byte) [
}
if !someMarketRequiresDelay {
for _, s := range batch.StopOrdersSubmission {
if s.FallsBelow != nil && app.txCache.IsDelayRequired(s.FallsBelow.OrderSubmission.MarketId) {
if s.FallsBelow != nil && s.FallsBelow.OrderSubmission != nil && app.txCache.IsDelayRequired(s.FallsBelow.OrderSubmission.MarketId) {
someMarketRequiresDelay = true
break
}
if !someMarketRequiresDelay {
if s.RisesAbove != nil && app.txCache.IsDelayRequired(s.RisesAbove.OrderSubmission.MarketId) {
if s.RisesAbove != nil && s.RisesAbove.OrderSubmission != nil && app.txCache.IsDelayRequired(s.RisesAbove.OrderSubmission.MarketId) {
someMarketRequiresDelay = true
break
}
Expand Down

0 comments on commit 49965dd

Please sign in to comment.