Skip to content

Commit

Permalink
reposition logs
Browse files Browse the repository at this point in the history
  • Loading branch information
atvanguard committed Mar 15, 2024
1 parent 10b3077 commit cb26844
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugin/evm/orderbook/matching_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down
2 changes: 1 addition & 1 deletion plugin/evm/orderbook/memory_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit cb26844

Please sign in to comment.