Skip to content

Commit e319fb8

Browse files
authored
Merge pull request #6547 from Crypt-iQ/boltfix_05-22
channeldb: copy value from boltdb's Get instead of using it directly
2 parents b31640e + 759d74e commit e319fb8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

channeldb/db.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -1254,11 +1254,13 @@ func (c *ChannelStateDB) GetChannelOpeningState(outPoint []byte) ([]byte, error)
12541254
return ErrChannelNotFound
12551255
}
12561256

1257-
serializedState = bucket.Get(outPoint)
1258-
if serializedState == nil {
1257+
stateBytes := bucket.Get(outPoint)
1258+
if stateBytes == nil {
12591259
return ErrChannelNotFound
12601260
}
12611261

1262+
serializedState = append(serializedState, stateBytes...)
1263+
12621264
return nil
12631265
}, func() {
12641266
serializedState = nil

docs/release-notes/release-notes-0.15.0.md

+3
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ from occurring that would result in an erroneous force close.](https://github.co
169169
* [Taproot wallet inputs can also be used to fund
170170
channels](https://github.com/lightningnetwork/lnd/pull/6521)
171171

172+
* [Fixed an intermittent panic that would occur due to a violated assumption with our
173+
underlying database.](https://github.com/lightningnetwork/lnd/pull/6547)
174+
172175
## Routing
173176

174177
* [Add a new `time_pref` parameter to the QueryRoutes and SendPayment APIs](https://github.com/lightningnetwork/lnd/pull/6024) that

0 commit comments

Comments
 (0)