diff --git a/plugin/evm/orderbook/matching_pipeline.go b/plugin/evm/orderbook/matching_pipeline.go index 9db66b8d80..18f1382aba 100644 --- a/plugin/evm/orderbook/matching_pipeline.go +++ b/plugin/evm/orderbook/matching_pipeline.go @@ -167,6 +167,7 @@ func (pipeline *MatchingPipeline) fetchOrders(market Market, underlyingPrice *bi // take the max of price of highest long and liq upper bound. But say longOrders[0].Price > oracleUpperBound ? - then we discard orders above oracleUpperBound, because they won't be matched no matter what upperBoundforShorts = utils.BigIntMin(utils.BigIntMax(longOrders[0].Price, upperBoundforShorts), oracleUpperBound) } + log.Debug("invoking GetShortOrders", "market", market, "upperBoundforShorts", upperBoundforShorts, "blockNumber", blockNumber) shortOrders := removeOrdersWithIds(pipeline.db.GetShortOrders(market, upperBoundforShorts, blockNumber), cancellableOrderIds) return &Orders{longOrders, shortOrders} } diff --git a/plugin/evm/orderbook/memory_database.go b/plugin/evm/orderbook/memory_database.go index 780be40309..56b0e4b9cf 100644 --- a/plugin/evm/orderbook/memory_database.go +++ b/plugin/evm/orderbook/memory_database.go @@ -645,11 +645,11 @@ func (db *InMemoryDatabase) getLongOrdersWithoutLock(market Market, lowerbound * func (db *InMemoryDatabase) GetShortOrders(market Market, upperbound *big.Int, blockNumber *big.Int) []Order { db.mu.RLock() defer db.mu.RUnlock() + log.Debug("calling getShortOrdersWithoutLock", "market", market, "upperbound", upperbound, "blockNumber", blockNumber, "shouldClean", true) return db.getShortOrdersWithoutLock(market, upperbound, blockNumber, true) } func (db *InMemoryDatabase) getShortOrdersWithoutLock(market Market, upperbound *big.Int, blockNumber *big.Int, shouldClean bool) []Order { - log.Debug("getShortOrdersWithoutLock", "market", market, "upperbound", upperbound, "blockNumber", blockNumber, "shouldClean", shouldClean) var shortOrders []Order marketOrders := db.ShortOrders[market]