channeldb/graph: check correct bucket for nilness

This commit is contained in:
Johan T. Halseth 2019-01-12 18:59:44 +01:00
parent 15168c391e
commit 91c9e45031
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -1640,7 +1640,7 @@ func delChannelByEdge(edges *bbolt.Bucket, edgeIndex *bbolt.Bucket,
func (c *ChannelGraph) UpdateEdgePolicy(edge *ChannelEdgePolicy) error {
return c.db.Update(func(tx *bbolt.Tx) error {
edges := tx.Bucket(edgeBucket)
if edge == nil {
if edges == nil {
return ErrEdgeNotFound
}