lnd: properly pass peer remote db for graph, local db for rest

In this commit, we fix a mistake in the split for the new `peer`
package/struct when instantiating the config needed. The existing code
had the DB's swapped. In this commit, we fix this to pass the remote DB
for generic channeldb access, and the local DB for channel graph access.
This commit is contained in:
Olaoluwa Osuntokun 2020-08-12 14:05:31 -07:00
parent 37a29b4869
commit 4603b3f981
No known key found for this signature in database
GPG Key ID: BC13F65E2DC84465

View File

@ -2853,8 +2853,8 @@ func (s *server) peerConnected(conn net.Conn, connReq *connmgr.ConnReq,
ReadPool: s.readPool,
Switch: s.htlcSwitch,
InterceptSwitch: s.interceptableSwitch,
ChannelDB: s.localChanDB,
ChannelGraph: s.remoteChanDB.ChannelGraph(),
ChannelDB: s.remoteChanDB,
ChannelGraph: s.localChanDB.ChannelGraph(),
ChainArb: s.chainArb,
AuthGossiper: s.authGossiper,
ChanStatusMgr: s.chanStatusMgr,