channeldb: add PutClosedScid and IsClosedScid

This commit adds the ability to store closed channels by scid in
the database. This will allow the gossiper to ignore channel
announcements for closed channels without having to do any
expensive validation.
This commit is contained in:
Eugene Siegel
2024-08-14 13:56:31 -04:00
parent 8939a217c3
commit 199e83d3f2
3 changed files with 85 additions and 0 deletions

View File

@@ -43,6 +43,10 @@ var (
// created.
ErrMetaNotFound = fmt.Errorf("unable to locate meta information")
// ErrClosedScidsNotFound is returned when the closed scid bucket
// hasn't been created.
ErrClosedScidsNotFound = fmt.Errorf("closed scid bucket doesn't exist")
// ErrGraphNotFound is returned when at least one of the components of
// graph doesn't exist.
ErrGraphNotFound = fmt.Errorf("graph bucket not initialized")