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.
This commit is contained in:
Olaoluwa Osuntokun 2017-11-10 19:33:02 -08:00
parent 3875754e0f
commit 699e5327e1
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

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