<p>The <code>flags</code> field (2 bytes) has been split into two different (1 byte) fields, the <code>message_flags</code> (most significant bits) and the <code>channel_flags</code> field (least significant bits). Hence the flags value displayed in <code>lnd</code> has the <code>message_flags</code> byte set to <code>0x00</code> and the <code>message_flags</code> set to <code>0x01</code>.</p>

<p><code>message_flags</code> indicates that this <code>channel_update</code> has some optional fields appended to the end. In this case it has the 0th bit set, which corresponds to the <code>option_channel_htlc_max</code> option, hence the <code>channel_update</code> has an additional field <code>htlc_maximum_msat</code> appended.</p>

CC BY-SA 4.0
2019-01-15T11:31:08.567Z
So Basically the "Flag" is a 16 bits field [8 bit message_flag + 8 bit channel_flags]. 

Is it possible to find the others information [cltv_expiry_delta, htlc_minimum_msat, fee_base_msat, fee_proportional_millionths, htlc_maximum_msat] exploring the log or it is only possible by using the lncli getchainifo? 

How can a Node, receiving a channel update message, understand and set the new channel policies?
Stefano Angieri
CC BY-SA 4.0
2019-01-15T12:55:41.303Z
Not too familiar with the `lnd` RPC interface, I mostly work on c-lightning. But I guess it should list those with peers as well. And you can set all of these parameters on startup using cli options.
cdecker
CC BY-SA 4.0
2019-01-11T19:08:25.007Z
2019-01-11T19:08:25.007Z
cdecker
<p>This is a lnd.log line:</p>

<pre><code>2019-01-11 12:20:13.904 [DBG] PEER: Sending ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=601495532567724033, flag=256, update_time=2019-01-11 12:19:08 +0100 CET) to 46.229.165.136:9735
</code></pre>

<p>Since I cannot find a direct correlation with the spec at <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md" rel="nofollow noreferrer">https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md</a> 
can someone clarify the "flag" value?</p>

<p>Where can I find the information below?</p>

<pre><code>[1:message_flags]
[1:channel_flags]
[2:cltv_expiry_delta]
[8:htlc_minimum_msat]
[4:fee_base_msat]
[4:fee_proportional_millionths]
[8:htlc_maximum_msat] (option_channel_htlc_max)
</code></pre>

<p>Are they encoded in some way in this "flag"? How? </p>

<lightning-network><lightning-network-daemon><lightning-rfc><channels>
Lightning Network `channel_update` message Flag clarification
Stefano Angieri
# Lightning Network `channel_update` message Flag clarification

(Asked by: username_0 on 2019-01-11)

This is a lnd.log line:

```
2019-01-11 12:20:13.904 [DBG] PEER: Sending ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=601495532567724033, flag=256, update_time=2019-01-11 12:19:08 +0100 CET) to 46.229.165.136:9735

```

Since I cannot find a direct correlation with the spec at <https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md>
can someone clarify the "flag" value?

Where can I find the information below?

```
[1:message_flags]
[1:channel_flags]
[2:cltv_expiry_delta]
[8:htlc_minimum_msat]
[4:fee_base_msat]
[4:fee_proportional_millionths]
[8:htlc_maximum_msat] (option_channel_htlc_max)

```

Are they encoded in some way in this "flag"? How?

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


---

## 1 answers

### Answer by username_1 on 2019-01-11. Score: 4 | Accepted answer

The `flags` field (2 bytes) has been split into two different (1 byte) fields, the `message_flags` (most significant bits) and the `channel_flags` field (least significant bits). Hence the flags value displayed in `lnd` has the `message_flags` byte set to `0x00` and the `message_flags` set to `0x01`.

`message_flags` indicates that this `channel_update` has some optional fields appended to the end. In this case it has the 0th bit set, which corresponds to the `option_channel_htlc_max` option, hence the `channel_update` has an additional field `htlc_maximum_msat` appended.

> **Comments:**
> **username_0**: So Basically the "Flag" is a 16 bits field [8 bit message_flag + 8 bit channel_flags].   Is it possible to find the others information [cltv_expiry_delta, htlc_minimum_msat, fee_base_msat, fee_proportional_millionths, htlc_maximum_msat] exploring the log or it is only possible by using the lncli getchainifo?   How can a Node, receiving a channel update message, understand and set the new channel policies?  
> **username_1**: Not too familiar with the `lnd` RPC interface, I mostly work on c-lightning. But I guess it should list those with peers as well. And you can set all of these parameters on startup using cli options.  

---

