channeldb+routing: move control tower interface to routing

This commit creates an empty shall for control tower in the routing
package. It is a preparation for adding event notification.
This commit is contained in:
Joost Jager
2019-05-29 08:57:04 +02:00
parent eb700d35e1
commit 87d3207baf
6 changed files with 109 additions and 45 deletions

View File

@@ -649,12 +649,14 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl,
routerrpc.GetMissionControlConfig(cfg.SubRPCServers.RouterRPC),
)
paymentControl := channeldb.NewPaymentControl(chanDB)
s.chanRouter, err = routing.New(routing.Config{
Graph: chanGraph,
Chain: cc.chainIO,
ChainView: cc.chainView,
Payer: s.htlcSwitch,
Control: channeldb.NewPaymentControl(chanDB),
Control: routing.NewControlTower(paymentControl),
MissionControl: s.missionControl,
ChannelPruneExpiry: routing.DefaultChannelPruneExpiry,
GraphPruneInterval: time.Duration(time.Hour),