From 4603b3f981a51b0dd26f75797d492a37737f0a74 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 12 Aug 2020 14:05:31 -0700 Subject: [PATCH] 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. --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 234d37a8c..499199749 100644 --- a/server.go +++ b/server.go @@ -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,