channeldb: fix panic bug in channeldb, check proper bucket for nil-ness

This commit is contained in:
Olaoluwa Osuntokun committed 2017-05-11 15:20:31 -07:00
1 parent a18d9b8449
commit 373a1192ce
1 file changed
+2 -2
+2 -2
View File
@@ -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
}