From 95a7f70e34edbc1992cf9194f8cb6ab72066e3ed Mon Sep 17 00:00:00 2001 From: ze97286 Date: Fri, 14 Jun 2024 18:05:17 +0100 Subject: [PATCH] fix: handle missing order submission in stop order --- CHANGELOG.md | 1 + core/processor/abci.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b82735899a..39d5a1dec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/core/processor/abci.go b/core/processor/abci.go index 4daf510a24..052cf9183e 100644 --- a/core/processor/abci.go +++ b/core/processor/abci.go @@ -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 }