channeldb/graph: don't create node bucket in PruneGraph
Instead return ErrSourceNodeNotSet directly. This would be returned from the call pruneGraphNodes -> sourceNode anyway.
This commit is contained in:
1 file changed
+3
-3
+3
-3
@@ -710,9 +710,9 @@ func (c *ChannelGraph) PruneGraph(spentOutputs []*wire.OutPoint,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
nodes, err := tx.CreateBucketIfNotExists(nodeBucket)
|
nodes := tx.Bucket(nodeBucket)
|
||||||
if err != nil {
|
if nodes == nil {
|
||||||
return err
|
return ErrSourceNodeNotSet
|
||||||
}
|
}
|
||||||
|
|
||||||
// For each of the outpoints that have been spent within the
|
// For each of the outpoints that have been spent within the
|
||||||
|
|||||||
Reference in new issue
Block a user