From 292defd6ba2a5b37d7a3f690361f702bb2273b48 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 17 Apr 2019 13:22:56 -0700 Subject: [PATCH] channeldb: add IsDisabled method to ChannelEdgePolicy --- channeldb/graph.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/channeldb/graph.go b/channeldb/graph.go index 0485cbbf..023df070 100644 --- a/channeldb/graph.go +++ b/channeldb/graph.go @@ -2728,6 +2728,12 @@ func (c *ChannelEdgePolicy) Signature() (*btcec.Signature, error) { return sig, nil } +// IsDisabled determines whether the edge has the disabled bit set. +func (c *ChannelEdgePolicy) IsDisabled() bool { + return c.ChannelFlags&lnwire.ChanUpdateDisabled == + lnwire.ChanUpdateDisabled +} + // FetchChannelEdgesByOutpoint attempts to lookup the two directed edges for // the channel identified by the funding outpoint. If the channel can't be // found, then ErrEdgeNotFound is returned. A struct which houses the general