mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 08:55:59 +01:00
channeldb: sent internal db pointer in FetchOpenChannels
This commit fixes a bug which would potentially cause a panic if a channel returned from FetchOpenChannels attempted to access the internal pointer to the database. To fix this bug, the pointer is now properly set once the channel has been loaded from the database.
This commit is contained in:
parent
6b53b393df
commit
07bc7bbd42
1 changed files with 1 additions and 0 deletions
|
@ -177,6 +177,7 @@ func (d *DB) FetchOpenChannels(nodeID *wire.ShaHash) ([]*OpenChannel, error) {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oChannel.Db = d
|
||||
|
||||
channels = append(channels, oChannel)
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue