Skip nil buckets in compactdb

pull/17/head v0.5.1
Oliver Gugger 4 years ago
parent 4f343dd8f1
commit 1e807f6e91
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -143,6 +143,11 @@ type walkFunc func(keys [][]byte, k, v []byte, seq uint64) error
func (c *compactDBCommand) walk(db *bbolt.DB, walkFn walkFunc) error {
return db.View(func(tx *bbolt.Tx) error {
return tx.ForEach(func(name []byte, b *bbolt.Bucket) error {
if b == nil {
log.Errorf("Bucket %x was nil! Probable data "+
"corruption suspected.", name)
return nil
}
return c.walkBucket(
b, nil, name, nil, b.Sequence(), walkFn,
)

@ -23,7 +23,7 @@ import (
const (
defaultAPIURL = "https://blockstream.info/api"
version = "0.5.0"
version = "0.5.1"
)
var (

Loading…
Cancel
Save