Skip to content

Commit

Permalink
Merge pull request #11424 from vegaprotocol/no-long-blocks-for-termin…
Browse files Browse the repository at this point in the history
…ated

fix: do not enter long block auction if market is terminated
  • Loading branch information
wwestgarth authored Jul 3, 2024
2 parents f4e364e + 5aecb04 commit 749eb77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/execution/future/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,10 @@ func (m *Market) uncrossOrderAtAuctionEnd(ctx context.Context) {
}

func (m *Market) EnterLongBlockAuction(ctx context.Context, duration int64) {
if !m.canTrade() {
return
}

m.mkt.State = types.MarketStateSuspended
m.mkt.TradingMode = types.MarketTradingModelLongBlockAuction
if m.as.InAuction() {
Expand Down
4 changes: 4 additions & 0 deletions core/execution/spot/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,10 @@ func (m *Market) uncrossOrderAtAuctionEnd(ctx context.Context) {
}

func (m *Market) EnterLongBlockAuction(ctx context.Context, duration int64) {
if !m.canTrade() {
return
}

m.mkt.State = types.MarketStateSuspended
m.mkt.TradingMode = types.MarketTradingModelLongBlockAuction
if m.as.InAuction() {
Expand Down

0 comments on commit 749eb77

Please sign in to comment.