lnd.xprv/channeldb/error.go
Olaoluwa Osuntokun e39dc9eec1
channeldb: add storage of an on-disk directed channel graph
This commit introduces a new capability to the database: storage of an
on-disk directed channel graph. The on-disk representation of the graph
within boltdb is essentially a modified adjacency list which separates
the storage of the edge’s existence and the storage of the edge
information itself.

The new objects provided within he ChannelGraph carry an API which
facilitates easy graph traversal via their ForEach* methods. As a
result, path finding algorithms will be able to be expressed in a
natural way using the range methods as a for-range language extension
within Go.

Additionally caching will likely be added either at this layer or the
layer above (the RoutingManager) in order keep queries and outgoing
payments speedy. In a future commit a new set of RPC’s to query the
state of a particular edge or node will also be added.
2016-12-07 22:50:19 -08:00

30 lines
1.1 KiB
Go

package channeldb
import "fmt"
var (
ErrNoChanDBExists = fmt.Errorf("channel db has not yet been created")
ErrNoActiveChannels = fmt.Errorf("no active channels exist")
ErrChannelNoExist = fmt.Errorf("this channel does not exist")
ErrNoPastDeltas = fmt.Errorf("channel has no recorded deltas")
ErrInvoiceNotFound = fmt.Errorf("unable to locate invoice")
ErrNoInvoicesCreated = fmt.Errorf("there are no existing invoices")
ErrDuplicateInvoice = fmt.Errorf("invoice with payment hash already exists")
ErrNodeNotFound = fmt.Errorf("link node with target identity not found")
ErrMetaNotFound = fmt.Errorf("unable to locate meta information")
ErrGraphNotFound = fmt.Errorf("graph bucket not initialized")
ErrGraphNodesNotFound = fmt.Errorf("no graph nodes exist")
ErrGraphNoEdgesFound = fmt.Errorf("no graph edges exist")
ErrGraphNodeNotFound = fmt.Errorf("unable to find node")
ErrEdgeNotFound = fmt.Errorf("edge for chanID not found")
ErrNodeAliasNotFound = fmt.Errorf("alias for node not found")
ErrSourceNodeNotSet = fmt.Errorf("source node does not exist")
)