2015-12-26 12:35:15 -06:00
|
|
|
package channeldb
|
2016-03-23 22:11:57 -07:00
|
|
|
|
2019-03-27 13:06:57 -07:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
2016-03-23 22:11:57 -07:00
|
|
|
|
|
|
|
var (
|
2017-02-24 16:32:33 +03:00
|
|
|
// ErrNoChanDBExists is returned when a channel bucket hasn't been
|
|
|
|
// created.
|
|
|
|
ErrNoChanDBExists = fmt.Errorf("channel db has not yet been created")
|
|
|
|
|
2020-02-21 13:23:30 +02:00
|
|
|
// ErrNoHistoricalBucket is returned when the historical channel bucket
|
|
|
|
// not been created yet.
|
|
|
|
ErrNoHistoricalBucket = fmt.Errorf("historical channel bucket has " +
|
|
|
|
"not yet been created")
|
|
|
|
|
2018-08-02 16:45:03 -07:00
|
|
|
// ErrDBReversion is returned when detecting an attempt to revert to a
|
|
|
|
// prior database version.
|
|
|
|
ErrDBReversion = fmt.Errorf("channel db cannot revert to prior version")
|
|
|
|
|
2017-02-24 16:32:33 +03:00
|
|
|
// ErrLinkNodesNotFound is returned when node info bucket hasn't been
|
|
|
|
// created.
|
2016-12-13 20:48:49 -08:00
|
|
|
ErrLinkNodesNotFound = fmt.Errorf("no link nodes exist")
|
2016-06-22 16:17:19 -07:00
|
|
|
|
2017-02-24 16:32:33 +03:00
|
|
|
// ErrNoActiveChannels is returned when there is no active (open)
|
|
|
|
// channels within the database.
|
2016-06-20 21:39:50 -07:00
|
|
|
ErrNoActiveChannels = fmt.Errorf("no active channels exist")
|
2016-09-16 17:23:37 -07:00
|
|
|
|
2017-02-24 16:32:33 +03:00
|
|
|
// ErrNoPastDeltas is returned when the channel delta bucket hasn't been
|
|
|
|
// created.
|
|
|
|
ErrNoPastDeltas = fmt.Errorf("channel has no recorded deltas")
|
|
|
|
|
|
|
|
// ErrNodeNotFound is returned when node bucket exists, but node with
|
|
|
|
// specific identity can't be found.
|
2016-10-25 14:04:42 -07:00
|
|
|
ErrNodeNotFound = fmt.Errorf("link node with target identity not found")
|
2017-02-24 16:32:33 +03:00
|
|
|
|
2018-09-21 17:03:56 -07:00
|
|
|
// ErrChannelNotFound is returned when we attempt to locate a channel
|
|
|
|
// for a specific chain, but it is not found.
|
|
|
|
ErrChannelNotFound = fmt.Errorf("channel not found")
|
|
|
|
|
2017-02-24 16:32:33 +03:00
|
|
|
// ErrMetaNotFound is returned when meta bucket hasn't been
|
|
|
|
// created.
|
2016-12-07 22:47:01 -08:00
|
|
|
ErrMetaNotFound = fmt.Errorf("unable to locate meta information")
|
|
|
|
|
2017-05-04 15:21:56 -07:00
|
|
|
// ErrNoClosedChannels is returned when a node is queries for all the
|
|
|
|
// channels it has closed, but it hasn't yet closed any channels.
|
|
|
|
ErrNoClosedChannels = fmt.Errorf("no channel have been closed yet")
|
2018-02-27 22:05:58 -08:00
|
|
|
|
|
|
|
// ErrNoForwardingEvents is returned in the case that a query fails due
|
|
|
|
// to the log not having any recorded events.
|
|
|
|
ErrNoForwardingEvents = fmt.Errorf("no recorded forwarding events")
|
2019-01-12 18:59:44 +01:00
|
|
|
|
2018-12-09 19:28:54 -08:00
|
|
|
// ErrChanAlreadyExists is return when the caller attempts to create a
|
|
|
|
// channel with a channel point that is already present in the
|
|
|
|
// database.
|
|
|
|
ErrChanAlreadyExists = fmt.Errorf("channel already exists")
|
2016-03-23 22:11:57 -07:00
|
|
|
)
|