From b8cbe3a1f82e858e43951edc80d074c248a404fb Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 11 Mar 2019 16:14:56 -0700 Subject: [PATCH] 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. --- channeldb/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channeldb/db.go b/channeldb/db.go index 51a0eb1be..d640cbdc8 100644 --- a/channeldb/db.go +++ b/channeldb/db.go @@ -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 }