From 699e5327e1628c0e0b3ad2c4563c81c845acc37c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 10 Nov 2017 19:33:02 -0800 Subject: [PATCH] channeldb: don't delete the chainHash bucket in CloseChannel In this commit, we fix an existing bug wherein if we closed two channels, then we were unable to read the channel state afterwards as we deleted the enclosing bucket. --- channeldb/channel.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/channeldb/channel.go b/channeldb/channel.go index 01b36ce5f..e01a035d8 100644 --- a/channeldb/channel.go +++ b/channeldb/channel.go @@ -1299,10 +1299,6 @@ func (c *OpenChannel) CloseChannel(summary *ChannelCloseSummary) error { if err != nil { return err } - err = nodeChanBucket.DeleteBucket(c.ChainHash[:]) - if err != nil { - return err - } // Finally, create a summary of this channel in the closed // channel bucket for this node.