lnd.xprv/channeldb/error.go
Olaoluwa Osuntokun 12538ea922
channeldb: add support for channel graph pruning
This commit adds support for channel graph pruning, which is the method
used to keep the channel graph in sync with the current UTXO state. As
the channel graph is essentially simply a subset of the UTXO set, by
evaluating the channel graph with the set of outfits spent within a
block, then we’re able to prune channels that’ve been closed by
spending their funding outpoint. A new method `PruneGraph` has been
provided which implements the described functionality.

Upon start up any upper routing layers should sync forward in the chain
pruning the channel graph with each newly found block. In order to
facilitate such channel graph reconciliation a new method `PruneTip`
has been added which allows callers to query current pruning state of
the channel graph.
2016-12-27 16:43:12 -08:00

34 lines
1.3 KiB
Go

package channeldb
import "fmt"
var (
ErrNoChanDBExists = fmt.Errorf("channel db has not yet been created")
ErrLinkNodesNotFound = fmt.Errorf("no link nodes exist")
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")
ErrNoPaymentsCreated = fmt.Errorf("there are no existing payments")
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")
ErrGraphNeverPruned = fmt.Errorf("graph never pruned")
ErrEdgeNotFound = fmt.Errorf("edge for chanID not found")
ErrNodeAliasNotFound = fmt.Errorf("alias for node not found")
ErrSourceNodeNotSet = fmt.Errorf("source node does not exist")
)