mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +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
@ -177,6 +177,7 @@ func (d *DB) FetchOpenChannels(nodeID *wire.ShaHash) ([]*OpenChannel, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
oChannel.Db = d
|
||||||
|
|
||||||
channels = append(channels, oChannel)
|
channels = append(channels, oChannel)
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user