graph/db: fix edges bucket check
This commit fixes a bug that would check that the passed `edge` argument of UpdateChannelEdge is nil but it should actually be checking if the `edges` bucket is nil.
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -1309,7 +1309,7 @@ func (c *ChannelGraph) UpdateChannelEdge(edge *models.ChannelEdgeInfo) error {
|
||||
|
||||
return kvdb.Update(c.db, func(tx kvdb.RwTx) error {
|
||||
edges := tx.ReadWriteBucket(edgeBucket)
|
||||
if edge == nil {
|
||||
if edges == nil {
|
||||
return ErrEdgeNotFound
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user