channeldb: in RestoreChannelShells don't exit if edge already exists

During the restore process, it may be possible that we have already
heard about our prior edge from a node on the network (or our channel
peers). As a result, we shouldn't exit if this happens, and instead
should continue with the rest of the restoration process.
This commit is contained in:
Olaoluwa Osuntokun committed 2019-03-28 17:54:06 -07:00
1 parent 26c52892cb
commit b8cbe3a1f8
1 file changed
+1 -1
+1 -1
View File
@@ -965,7 +965,7 @@ func (d *DB) RestoreChannelShells(channelShells ...*ChannelShell) error {
// With the edge info shell constructed, we'll now add
// it to the graph.
err = chanGraph.addChannelEdge(tx, &edgeInfo)
if err != nil {
if err != nil && err != ErrEdgeAlreadyExist {
return err
}