multi: split database storage into remote and local instances
In this commit, we split the database storage into two classes: remote and local data. If etcd isn't active, then everything is actually just local though we use two pointers everywhere. If etcd is active, then everything but the graph goes into the remote database.
This commit is contained in:
8 files changed
+240
-123
No files matched your search
+1
-1
@@ -456,7 +456,7 @@ func (p *Brontide) loadActiveChannels(chans []*channeldb.OpenChannel) (
|
||||
// Before we register this new link with the HTLC Switch, we'll
|
||||
// need to fetch its current link-layer forwarding policy from
|
||||
// the database.
|
||||
graph := p.cfg.ChannelDB.ChannelGraph()
|
||||
graph := p.cfg.ChannelGraph
|
||||
info, p1, p2, err := graph.FetchChannelEdgesByOutpoint(chanPoint)
|
||||
if err != nil && err != channeldb.ErrEdgeNotFound {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user