graph+discovery: update graph/db gossip backlog interfaces to use iter.Seq2

This lets us emit a rich error if things fail when first creating the
iterator, or if any of the yield attempts fail.
This commit is contained in:
Olaoluwa Osuntokun committed 2025-09-26 17:01:11 -07:00
1 parent 0b3816afb9
commit f3a8fd842d
8 files changed
+240 -208

No files matched your search

+2 -2
View File
@@ -154,8 +154,8 @@ type DB interface {
// at least one edge that has an update timestamp within the specified
// horizon.
ChanUpdatesInHorizon(startTime, endTime time.Time,
opts ...graphdb.IteratorOption) (
iter.Seq[graphdb.ChannelEdge], error)
opts ...graphdb.IteratorOption,
) iter.Seq2[graphdb.ChannelEdge, error]
// DeleteChannelEdges removes edges with the given channel IDs from the
// database and marks them as zombies. This ensures that we're unable to