Skip to content

Commit

Permalink
Merge pull request #9776 from vegaprotocol/9773
Browse files Browse the repository at this point in the history
fix: ensure invalid market for transfer doesn't panic
  • Loading branch information
jeremyletang authored Oct 13, 2023
2 parents fc28fea + 822fec6 commit caae176
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@
- [8702](https://github.com/vegaprotocol/vega/issues/8702) - Fix panic on auction exit after stop orders expired in auction
- [8703](https://github.com/vegaprotocol/vega/issues/8703) - Wire stop orders cancellation
- [8698](https://github.com/vegaprotocol/vega/issues/8698) - Always set the `ToAccount` field when clearing fees.
- [9773](https://github.com/vegaprotocol/vega/issues/9773) - Ensure invalid market for transfer doesn't panic

## 0.71.0

Expand Down
3 changes: 3 additions & 0 deletions core/execution/common/market_activity_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@ func (mat *MarketActivityTracker) calculateMetricForParty(asset, party string, m
// for each market in scope, for each epoch in the time window get the metric entry, sum up for each epoch in the time window and divide by window size (or calculate variance - for volatility)
for _, market := range markets {
marketTracker := assetTrackers[market]
if marketTracker == nil {
continue
}
switch metric {
case vega.DispatchMetric_DISPATCH_METRIC_AVERAGE_POSITION:
uTotal += marketTracker.getPositionMetricTotal(party, windowSize)
Expand Down

0 comments on commit caae176

Please sign in to comment.