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 2019-03-11 16:14:56 -07:00
parent 26c52892cb
commit b8cbe3a1f8
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2

@ -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
}