From daf12e4a4d279e991723d3c401407cea109def00 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 29 Nov 2017 09:56:58 +1030 Subject: [PATCH] channeld: channel_update must use peer's htlc_minimum_msat. As per the spec fix: lightningnetwork/lightning-rfc#287 Reported-by: Pierre-Marie Padiou Signed-off-by: Rusty Russell --- channeld/channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channeld/channel.c b/channeld/channel.c index 4d59a25fe..3f086a386 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -252,11 +252,11 @@ static u8 *create_channel_update(const tal_t *ctx, talz(tmpctx, secp256k1_ecdsa_signature); flags = peer->channel_direction | (disabled << 1); - /* FIXME: Add configuration option to specify `htlc_minimum_msat` */ cupdate = towire_channel_update( tmpctx, sig, &peer->chain_hash, &peer->short_channel_ids[LOCAL], timestamp, flags, - peer->cltv_delta, 1, peer->fee_base, peer->fee_per_satoshi); + peer->cltv_delta, peer->conf[REMOTE].htlc_minimum_msat, + peer->fee_base, peer->fee_per_satoshi); msg = towire_hsm_cupdate_sig_req(tmpctx, cupdate);