mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-01 19:10:59 +02:00
graph: add IsZombieEdge method
This is in preparation for the commit where we move across all the funding tx validation so that we can test that we are correctly updating the zombie index.
This commit is contained in:
@ -1630,6 +1630,16 @@ func (b *Builder) IsKnownEdge(chanID lnwire.ShortChannelID) bool {
|
||||
return exists || isZombie
|
||||
}
|
||||
|
||||
// IsZombieEdge returns true if the graph source has marked the given channel ID
|
||||
// as a zombie edge.
|
||||
//
|
||||
// NOTE: This method is part of the ChannelGraphSource interface.
|
||||
func (b *Builder) IsZombieEdge(chanID lnwire.ShortChannelID) (bool, error) {
|
||||
_, _, _, isZombie, err := b.cfg.Graph.HasChannelEdge(chanID.ToUint64())
|
||||
|
||||
return isZombie, err
|
||||
}
|
||||
|
||||
// IsStaleEdgePolicy returns true if the graph source has a channel edge for
|
||||
// the passed channel ID (and flags) that have a more recent timestamp.
|
||||
//
|
||||
|
Reference in New Issue
Block a user