<p>The <code>disabled</code> field is a reference to an edge instead of the whole channel, but the api in lnd doesn't surface edges, so it must be inferred by the direction of fund movements.</p>
<p>Very quickly, what is an <code>edge</code>? In bidirected graphs (which the lightning network currently can be viewed as) what we consider a <code>channel</code> is actually comprised of two entities with direction, called <code>edges</code>.</p>
<p>For example:</p>
<pre><code>┌────────┐               ┌────────┐
│        ├────edge 1────►│        │
│ alice  │               │  bob   │
│        │◄───edge 2─────┤        │
└────────┘               └────────┘
</code></pre>
<p>Okay, channels are really 2 edges. Why is that important? Well sometimes it's important to allow fund movement in a certain direction, without allowing movement in another. For example, a popular merchant node wants to allow people to send into their channel so they can collect money in a specific channel, without allowing people to forward through their node and move funds out of another channel. The merchant may want to do this if the specific outgoing channel is used for returns. People forward through that channel may up end the liquidity balance making it impossible to process returns to customers. But, crucially, they want to allow people to be able to send them funds in all directions (they are a merchant after all!)</p>
<p>Such precision is not given with our channels which are bidirectional, so we must look at tweaking the edges. Since we don't want to 'turn off' any channels completely, we cannot set any channel to <code>inactive</code> - this will not allow movement in <em>any</em> direction.</p>
<p>So to reiterate</p>
<pre><code>All channels active and none disabled
┌────────┐               ┌──────────┐               ┌────────┐
│        ├────edge 1────►│          ├────edge 3────►│        │
│ alice  │               │ merchant │               │ carol  │
│        │◄───edge 2─────┤          │◄───edge 4─────┤        │
└────────┘               └──────────┘               └────────┘
            [active]                     [active]


All channels active and edge 4 disabled
┌────────┐               ┌──────────┐               ┌────────┐
│        ├────edge 1────►│          ├────edge 3────►│        │
│ alice  │               │ merchant │               │ carol  │
│        │◄───edge 2─────┤          │◄──X─edge 4──X─┤        │
└────────┘               └──────────┘               └────────┘
            [active]                     [active]


alice to merchant inactive and and edge 4 disabled
┌────────┐               ┌──────────┐               ┌────────┐
│        ├──X─edge 1─X──►│          ├────edge 3────►│        │
│ alice  │               │ merchant │               │ carol  │
│        │◄─X─edge 2─X───┤          │◄──X─edge 4──X─┤        │
└────────┘               └──────────┘               └────────┘
            [inactive]                   [active]

</code></pre>

CC BY-SA 4.0
2022-11-22T05:43:25.653Z
2022-11-22T05:43:25.653Z
arshbot
<p>lnd v0.15.3-beta</p>
<p>The <a href="https://api.lightning.community/#lnrpc-routingpolicy" rel="nofollow noreferrer">documentation</a> for <code>lnrpc.RoutingPolicy</code> shows a boolean field called <code>disabled</code>, but it provides no definition of what that means. Each channel has 2 peers, and each peer in a channel has its own routing policy. Some of the channels have disabled set to true for one peer and false for the other.</p>
<p>Here is an example:</p>
<pre><code>$ lncli getchaninfo 697113461880782849
{
    &quot;channel_id&quot;: &quot;697113461880782849&quot;,
    &quot;chan_point&quot;: &quot;094c1a9d6cd5294847f560758e8b8d8cdb4ef386ca746112536564742a92184b:1&quot;,
    &quot;last_update&quot;: 1667018957,
    &quot;node1_pub&quot;: &quot;02572c2e1b43a78bb060e7d322b033443efc0d8d60fc2b111dd8bb999aa940d1f5&quot;,
    &quot;node2_pub&quot;: &quot;02a45def9ae014fdd2603dd7033d157faa3a55a72b06a63ae22ef46d9fafdc6e8d&quot;,
    &quot;capacity&quot;: &quot;5281151&quot;,
    &quot;node1_policy&quot;: {
        &quot;time_lock_delta&quot;: 40,
        &quot;min_htlc&quot;: &quot;1000&quot;,
        &quot;fee_base_msat&quot;: &quot;1000&quot;,
        &quot;fee_rate_milli_msat&quot;: &quot;10&quot;,
        &quot;disabled&quot;: false,
        &quot;max_htlc_msat&quot;: &quot;5228340000&quot;,
        &quot;last_update&quot;: 1665821197
    },
    &quot;node2_policy&quot;: {
        &quot;time_lock_delta&quot;: 24,
        &quot;min_htlc&quot;: &quot;1000&quot;,
        &quot;fee_base_msat&quot;: &quot;0&quot;,
        &quot;fee_rate_milli_msat&quot;: &quot;501&quot;,
        &quot;disabled&quot;: true,
        &quot;max_htlc_msat&quot;: &quot;5228340000&quot;,
        &quot;last_update&quot;: 1667018957
    }
}
</code></pre>
<p>Is it true that a channel is only active if the routing policy for both peers shows <code>disabled = false</code>?</p>
<p>Or is setting a routing policy to disabled the equivalent of setting it to null? Some channels have peers with null routing policies as in this example:</p>
<pre><code>$ lncli getchaninfo 555817421567164416
{
    &quot;channel_id&quot;: &quot;555817421567164416&quot;,
    &quot;chan_point&quot;: &quot;43a329e374f19ac11cb8377d8d791505d27e60c221a3cfe99a2d758318803e0f:0&quot;,
    &quot;last_update&quot;: 0,
    &quot;node1_pub&quot;: &quot;0207481a19a3f51a48f134e95afa67cfeffdb38a99b5ad3494a320c4918aaaf579&quot;,
    &quot;node2_pub&quot;: &quot;02ef61a252f9504a42fc264a28476f44cea0711a44b2da0bd729ad52aaee9d86b7&quot;,
    &quot;capacity&quot;: &quot;10000&quot;,
    &quot;node1_policy&quot;: null,
    &quot;node2_policy&quot;: null
}
</code></pre>
<p>Is the above channel active? If so, does it use default routing policy values?</p>
<p>Is <code>disabled = true</code> the same as a null routing policy? Or does it disable the whole channel if one node disables its routing policy?</p>

<lightning-network><lightning-network-daemon><lightning-routing><channels>
What does the disabled field of the RoutingPolicy object mean in LND?
Zephyrus
# What does the disabled field of the RoutingPolicy object mean in LND?

(Asked by: username_0 on 2022-11-21)

lnd v0.15.3-beta

The [documentation](https://api.lightning.community/#lnrpc-routingpolicy) for `lnrpc.RoutingPolicy` shows a boolean field called `disabled`, but it provides no definition of what that means. Each channel has 2 peers, and each peer in a channel has its own routing policy. Some of the channels have disabled set to true for one peer and false for the other.

Here is an example:

```
$ lncli getchaninfo 697113461880782849
{
    "channel_id": "697113461880782849",
    "chan_point": "094c1a9d6cd5294847f560758e8b8d8cdb4ef386ca746112536564742a92184b:1",
    "last_update": 1667018957,
    "node1_pub": "02572c2e1b43a78bb060e7d322b033443efc0d8d60fc2b111dd8bb999aa940d1f5",
    "node2_pub": "02a45def9ae014fdd2603dd7033d157faa3a55a72b06a63ae22ef46d9fafdc6e8d",
    "capacity": "5281151",
    "node1_policy": {
        "time_lock_delta": 40,
        "min_htlc": "1000",
        "fee_base_msat": "1000",
        "fee_rate_milli_msat": "10",
        "disabled": false,
        "max_htlc_msat": "5228340000",
        "last_update": 1665821197
    },
    "node2_policy": {
        "time_lock_delta": 24,
        "min_htlc": "1000",
        "fee_base_msat": "0",
        "fee_rate_milli_msat": "501",
        "disabled": true,
        "max_htlc_msat": "5228340000",
        "last_update": 1667018957
    }
}

```

Is it true that a channel is only active if the routing policy for both peers shows `disabled = false`?

Or is setting a routing policy to disabled the equivalent of setting it to null? Some channels have peers with null routing policies as in this example:

```
$ lncli getchaninfo 555817421567164416
{
    "channel_id": "555817421567164416",
    "chan_point": "43a329e374f19ac11cb8377d8d791505d27e60c221a3cfe99a2d758318803e0f:0",
    "last_update": 0,
    "node1_pub": "0207481a19a3f51a48f134e95afa67cfeffdb38a99b5ad3494a320c4918aaaf579",
    "node2_pub": "02ef61a252f9504a42fc264a28476f44cea0711a44b2da0bd729ad52aaee9d86b7",
    "capacity": "10000",
    "node1_policy": null,
    "node2_policy": null
}

```

Is the above channel active? If so, does it use default routing policy values?

Is `disabled = true` the same as a null routing policy? Or does it disable the whole channel if one node disables its routing policy?

**Tags:** lightning-network, lightning-network-daemon, lightning-routing, channels


---

## 1 answers

### Answer by username_1 on 2022-11-22. Score: 0 | Accepted answer

The `disabled` field is a reference to an edge instead of the whole channel, but the api in lnd doesn't surface edges, so it must be inferred by the direction of fund movements.

Very quickly, what is an `edge`? In bidirected graphs (which the lightning network currently can be viewed as) what we consider a `channel` is actually comprised of two entities with direction, called `edges`.

For example:

```
┌────────┐               ┌────────┐
│        ├────edge 1────►│        │
│ alice  │               │  bob   │
│        │◄───edge 2─────┤        │
└────────┘               └────────┘

```

Okay, channels are really 2 edges. Why is that important? Well sometimes it's important to allow fund movement in a certain direction, without allowing movement in another. For example, a popular merchant node wants to allow people to send into their channel so they can collect money in a specific channel, without allowing people to forward through their node and move funds out of another channel. The merchant may want to do this if the specific outgoing channel is used for returns. People forward through that channel may up end the liquidity balance making it impossible to process returns to customers. But, crucially, they want to allow people to be able to send them funds in all directions (they are a merchant after all!)

Such precision is not given with our channels which are bidirectional, so we must look at tweaking the edges. Since we don't want to 'turn off' any channels completely, we cannot set any channel to `inactive` - this will not allow movement in *any* direction.

So to reiterate

```
All channels active and none disabled
┌────────┐               ┌──────────┐               ┌────────┐
│        ├────edge 1────►│          ├────edge 3────►│        │
│ alice  │               │ merchant │               │ carol  │
│        │◄───edge 2─────┤          │◄───edge 4─────┤        │
└────────┘               └──────────┘               └────────┘
            [active]                     [active]

All channels active and edge 4 disabled
┌────────┐               ┌──────────┐               ┌────────┐
│        ├────edge 1────►│          ├────edge 3────►│        │
│ alice  │               │ merchant │               │ carol  │
│        │◄───edge 2─────┤          │◄──X─edge 4──X─┤        │
└────────┘               └──────────┘               └────────┘
            [active]                     [active]

alice to merchant inactive and and edge 4 disabled
┌────────┐               ┌──────────┐               ┌────────┐
│        ├──X─edge 1─X──►│          ├────edge 3────►│        │
│ alice  │               │ merchant │               │ carol  │
│        │◄─X─edge 2─X───┤          │◄──X─edge 4──X─┤        │
└────────┘               └──────────┘               └────────┘
            [inactive]                   [active]

```


---

