diff --git a/src/lib/md/MBOProcessor.h b/src/lib/md/MBOProcessor.h index e6bd0213b..9962208f3 100644 --- a/src/lib/md/MBOProcessor.h +++ b/src/lib/md/MBOProcessor.h @@ -41,6 +41,13 @@ struct MBOSnapshot { void reset() { updated = utils::TimeStamp(); + constexpr int max = 256; + if (bids.size() > max) { + bids.resize(max); + } + if (asks.size() > max) { + asks.resize(max); + } bids.clear(); asks.clear(); }