BOLT: fee requirements update.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-07-01 11:19:28 +09:30
parent 3de6ca3d0b
commit 08a910b06e
2 changed files with 4 additions and 8 deletions

View File

@@ -647,18 +647,14 @@ Pkt *accept_pkt_htlc_add(struct peer *peer, const Pkt *pkt)
/* BOLT #2:
*
* A node MUST NOT offer `amount_msat` it cannot pay for in
* both commitment transactions at the current `fee_rate` (see
* the remote commitment transaction at the current `fee_rate` (see
* "Fee Calculation" ). A node SHOULD fail the connection if
* this occurs.
*/
/* FIXME: This is wrong! We may have already added more txs to
* them.staging_cstate, driving that fee up.
* We should check against the last version they acknowledged. */
if (!cstate_add_htlc(peer->local.staging_cstate, htlc, THEIRS)) {
tal_free(htlc);
return pkt_err(peer, "Cannot afford %"PRIu64" milli-satoshis"
" in your commitment tx",
" in our commitment tx",
u->amount_msat);
}