From 62b37f45f525a08726a38942e398afe1328c626d Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 23 Sep 2016 15:00:38 -0700 Subject: [PATCH] channeldb: include in the invoice bucket when wiping and initializing the db --- channeldb/db.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/channeldb/db.go b/channeldb/db.go index 54fe4a2c..e242f025 100644 --- a/channeldb/db.go +++ b/channeldb/db.go @@ -71,6 +71,11 @@ func (d *DB) Wipe() error { return err } + err = tx.DeleteBucket(invoiceBucket) + if err != nil && err != bolt.ErrBucketNotFound { + return err + } + return nil }) } @@ -110,6 +115,10 @@ func createChannelDB(dbPath string) error { return err } + if _, err := tx.CreateBucket(invoiceBucket); err != nil { + return err + } + return nil }) if err != nil {