Skip to content

Commit

Permalink
lnd: Include kvdbStorage in server and peer config
Browse files Browse the repository at this point in the history
Signed-off-by: Ononiwu <[email protected]>
  • Loading branch information
Chinwendu20 committed Feb 29, 2024
1 parent 97e2a23 commit 7344ebd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ type server struct {

customMessageServer *subscribe.Server

kvdbPeerStorage *kvdbPeerStorage

quit chan struct{}

wg sync.WaitGroup
Expand Down Expand Up @@ -1492,6 +1494,11 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
return nil, err
}

s.kvdbPeerStorage, err = newKvdbPeerStorage(&peerStorageConfig{
chainNotifier: s.cc.ChainNotifier,
db: dbs.PeerStorageDB,
blockViewer: s.cc.BestBlockTracker,
})
// Assemble a peer notifier which will provide clients with subscriptions
// to peer online and offline events.
s.peerNotifier = peernotifier.New()
Expand Down Expand Up @@ -3868,6 +3875,7 @@ func (s *server) peerConnected(conn net.Conn, connReq *connmgr.ConnReq,
GetAliases: s.aliasMgr.GetAliases,
RequestAlias: s.aliasMgr.RequestAlias,
AddLocalAlias: s.aliasMgr.AddLocalAlias,
PeerDataStore: s.kvdbPeerStorage,
Quit: s.quit,
}

Expand Down

0 comments on commit 7344ebd

Please sign in to comment.