Skip to content

Commit

Permalink
dex: add TODO about handleDEXConfig comms.Route
Browse files Browse the repository at this point in the history
market: create (*Market).StartEpochIdx in anticipation of handleDEXConfig
  • Loading branch information
chappjc committed Jan 13, 2020
1 parent d9e8e8e commit 25ef991
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/dex/dex.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ func (dm *DEX) Stop() {
}
}

// TODO
//func (dm *DEX) handleDEXConfig (conn comms.Link, msg *msgjson.Message) *msgjson.Error { }

// NewDEX creates the dex manager and starts all subsystems. Use Stop to
// shutdown cleanly.
// 1. Validate each specified asset.
Expand Down Expand Up @@ -336,5 +339,9 @@ func NewDEX(cfg *DexConf) (*DEX, error) {
stopWaiters: stopWaiters,
server: server,
}

// TODO:
//comms.Route(msgjson.ConfigRoute, dexMgr.handleDEXConfig)

return dexMgr, nil
}
5 changes: 5 additions & 0 deletions server/market/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ func (m *Market) SetStartEpochIdx(startEpochIdx int64) {
atomic.StoreInt64(&m.startEpochIdx, startEpochIdx)
}

// StartEpochIdx gets the starting epoch index.
func (m *Market) StartEpochIdx() int64 {
return atomic.LoadInt64(&m.startEpochIdx)
}

// Start beings order processing with a starting epoch index. See also
// SetStartEpochIdx and Run. Stop the Market by cancelling the context.
func (m *Market) Start(ctx context.Context, startEpochIdx int64) {
Expand Down

0 comments on commit 25ef991

Please sign in to comment.