channeldb: fix panic bug in channeldb, check proper bucket for nil-ness
This commit is contained in:
parent
a18d9b8449
commit
373a1192ce
@ -561,7 +561,7 @@ func (c *OpenChannel) RevocationLogTail() (*ChannelDelta, error) {
|
||||
}
|
||||
|
||||
logBucket := nodeChanBucket.Bucket(channelLogBucket)
|
||||
if nodeChanBucket == nil {
|
||||
if logBucket == nil {
|
||||
return ErrNoPastDeltas
|
||||
}
|
||||
|
||||
@ -635,7 +635,7 @@ func (c *OpenChannel) FindPreviousState(updateNum uint64) (*ChannelDelta, error)
|
||||
}
|
||||
|
||||
logBucket := nodeChanBucket.Bucket(channelLogBucket)
|
||||
if nodeChanBucket == nil {
|
||||
if logBucket == nil {
|
||||
return ErrNoPastDeltas
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user