channeldb/graph: don't create bucket in delEdgeUpdateIndexEntry
We are deleting what's in the bucket, so if it doesn't exist, just return early with a non-error.
This commit is contained in:
parent
84de318553
commit
86d40636cd
@ -1528,11 +1528,10 @@ func delEdgeUpdateIndexEntry(edgesBucket *bbolt.Bucket, chanID uint64,
|
|||||||
|
|
||||||
// First, we'll fetch the edge update index bucket which currently
|
// First, we'll fetch the edge update index bucket which currently
|
||||||
// stores an entry for the channel we're about to delete.
|
// stores an entry for the channel we're about to delete.
|
||||||
updateIndex, err := edgesBucket.CreateBucketIfNotExists(
|
updateIndex := edgesBucket.Bucket(edgeUpdateIndexBucket)
|
||||||
edgeUpdateIndexBucket,
|
if updateIndex == nil {
|
||||||
)
|
// No edges in bucket, return early.
|
||||||
if err != nil {
|
return nil
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now that we have the bucket, we'll attempt to construct a template
|
// Now that we have the bucket, we'll attempt to construct a template
|
||||||
|
Loading…
Reference in New Issue
Block a user