Skip to content

Commit

Permalink
minor clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
norwnd committed Feb 8, 2025
1 parent 562f6b1 commit 2368db3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions client/core/bookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ func (b *bookie) closeFeeds() {
close(f.c)
}
b.feeds = make(map[uint32]*bookFeed, 1)

}

// candles fetches the candle set from the server and activates the candle
Expand Down Expand Up @@ -448,8 +447,8 @@ func (dc *dexConnection) syncBook(base, quote uint32) (*orderbook.OrderBook, Boo
dc.books[mktID] = booky
}

// Get the feed and the book under a single lock to make sure the first
// message is the book.
// Get the feed and the book under a single lock to make sure the first message is "book"
// (so that nobody else could send anything on this feed concurrently).
feed := booky.newFeed(&BookUpdate{
Action: FreshBookAction,
Host: dc.acct.host,
Expand Down
2 changes: 1 addition & 1 deletion client/mm/mm_basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func (m *basicMarketMaker) ordersToPlace() (buyOrders, sellOrders []*TradePlacem
if err != nil {
return nil, nil, fmt.Errorf("fetch Bison book: %v", err)
}
defer feed.Close() // have to release resources, otherwise feed isn't used here
defer feed.Close() // have to release resources, feed isn't used here otherwise

// bestBuy falls back to basisPrice-4%, this is a reasonably safe reference point
bestBuy := steppedRate(uint64(float64(basisPrice)-0.04*float64(basisPrice)), m.rateStep)
Expand Down

0 comments on commit 2368db3

Please sign in to comment.