channeldb: include in the invoice bucket when wiping and initializing the db

This commit is contained in:
Olaoluwa Osuntokun 2016-09-23 15:00:38 -07:00
parent 913504581d
commit 62b37f45f5
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 9 additions and 0 deletions

View File

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