daemon: update limit to reflect latest BOLT#2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-05-06 14:42:52 +09:30
parent db3faf0f52
commit 09de557c69
2 changed files with 6 additions and 6 deletions

View File

@@ -558,10 +558,10 @@ Pkt *accept_pkt_htlc_add(struct peer *peer, const Pkt *pkt)
/* BOLT #2: /* BOLT #2:
* *
* A node MUST NOT add a HTLC if it would result in it * 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 if (tal_count(peer->them.staging_cstate->a.htlcs) == 300
|| tal_count(peer->us.staging_cstate->b.htlcs) == 1500) || tal_count(peer->us.staging_cstate->b.htlcs) == 300)
return pkt_err(peer, "Too many HTLCs"); return pkt_err(peer, "Too many HTLCs");
/* BOLT #2: /* BOLT #2:

View File

@@ -2086,10 +2086,10 @@ static void do_newhtlc(struct peer *peer, struct newhtlc *newhtlc)
/* BOLT #2: /* BOLT #2:
* *
* A node MUST NOT add a HTLC if it would result in it * 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 if (tal_count(peer->us.staging_cstate->a.htlcs) == 300
|| tal_count(peer->them.staging_cstate->b.htlcs) == 1500) { || tal_count(peer->them.staging_cstate->b.htlcs) == 300) {
command_fail(newhtlc->jsoncmd, "Too many HTLCs"); command_fail(newhtlc->jsoncmd, "Too many HTLCs");
} }