From 09de557c69cfb36b05a05a44dac802399bb0388a Mon Sep 17 00:00:00 2001 From: Rusty Russell <rusty@rustcorp.com.au> Date: Fri, 6 May 2016 14:42:52 +0930 Subject: [PATCH] daemon: update limit to reflect latest BOLT#2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- daemon/packets.c | 6 +++--- daemon/peer.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/packets.c b/daemon/packets.c index 4b68e3866..1f3d63840 100644 --- a/daemon/packets.c +++ b/daemon/packets.c @@ -558,10 +558,10 @@ Pkt *accept_pkt_htlc_add(struct peer *peer, const Pkt *pkt) /* BOLT #2: * * A node MUST NOT add a HTLC if it would result in it - * offering more than 1500 HTLCs in either commitment transaction. + * offering more than 300 HTLCs in either commitment transaction. */ - if (tal_count(peer->them.staging_cstate->a.htlcs) == 1500 - || tal_count(peer->us.staging_cstate->b.htlcs) == 1500) + if (tal_count(peer->them.staging_cstate->a.htlcs) == 300 + || tal_count(peer->us.staging_cstate->b.htlcs) == 300) return pkt_err(peer, "Too many HTLCs"); /* BOLT #2: diff --git a/daemon/peer.c b/daemon/peer.c index fa17212b3..ca525808d 100644 --- a/daemon/peer.c +++ b/daemon/peer.c @@ -2086,10 +2086,10 @@ static void do_newhtlc(struct peer *peer, struct newhtlc *newhtlc) /* BOLT #2: * * A node MUST NOT add a HTLC if it would result in it - * offering more than 1500 HTLCs in either commitment transaction. + * offering more than 300 HTLCs in either commitment transaction. */ - if (tal_count(peer->us.staging_cstate->a.htlcs) == 1500 - || tal_count(peer->them.staging_cstate->b.htlcs) == 1500) { + if (tal_count(peer->us.staging_cstate->a.htlcs) == 300 + || tal_count(peer->them.staging_cstate->b.htlcs) == 300) { command_fail(newhtlc->jsoncmd, "Too many HTLCs"); }