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:
Elle Mouton 2025-02-18 11:04:27 -03:00
parent b08bc99945
commit e58abbf0e5
No known key found for this signature in database
GPG key ID: D7D916376026F177

View file

@ -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
}