Browse Source

Add comments of BOLT quote about 'htlc_maximum_mast' bound

s channeld.c

s channeld.c
pr-2587
trueptolemy 6 years ago
committed by neil saitug
parent
commit
d140e927bf
  1. 11
      channeld/channeld.c

11
channeld/channeld.c

@ -265,9 +265,18 @@ static struct amount_msat advertised_htlc_max(const struct channel *channel)
type_to_string(tmpctx, struct amount_sat, type_to_string(tmpctx, struct amount_sat,
&lower_bound)); &lower_bound));
} }
/* FIXME BOLT QUOTE: https://github.com/lightningnetwork/lightning-rfc/pull/512 once merged */
if (amount_msat_greater(lower_bound_msat, if (amount_msat_greater(lower_bound_msat,
channel->chainparams->max_payment)) channel->chainparams->max_payment))
/* BOLT #7:
*
* The origin node:
* ...
* - if the `htlc_maximum_msat` field is present:
* ...
* - for channels with `chain_hash` identifying the Bitcoin blockchain:
* - MUST set this to less than 2^32.
*/
lower_bound_msat = channel->chainparams->max_payment; lower_bound_msat = channel->chainparams->max_payment;
return lower_bound_msat; return lower_bound_msat;

Loading…
Cancel
Save