channeldb: return ErrNoPendingCommit in case of no channel bucket

This commit is contained in:
Johan T. Halseth committed 2018-05-08 13:41:52 +02:00
1 parent 9324bf7b1d
commit f26ec38a74
1 file changed
+3 -1
+3 -1
View File
@@ -1223,7 +1223,9 @@ func (c *OpenChannel) RemoteCommitChainTip() (*CommitDiff, error) {
err := c.Db.View(func(tx *bolt.Tx) error {
chanBucket, err := readChanBucket(tx, c.IdentityPub,
&c.FundingOutpoint, c.ChainHash)
if err != nil {
if err == ErrNoActiveChannels || err == ErrNoChanDBExists {
return ErrNoPendingCommit
} else if err != nil {
return err
}