mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
channel: Use min_cltv_expiry in the channel announcements
So far we were always using the deadline in the announcements, that's obviously not good, so this introduces the parameter as per spec. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
a44f893838
commit
641a3b64cf
@@ -2034,7 +2034,7 @@ static bool peer_start_channeld(struct peer *peer,
|
||||
&peer->ld->id,
|
||||
&peer->id,
|
||||
time_to_msec(cfg->commit_time),
|
||||
cfg->deadline_blocks,
|
||||
cfg->min_htlc_expiry,
|
||||
peer->last_was_revoke,
|
||||
peer->last_sent_commit,
|
||||
peer->next_index[LOCAL],
|
||||
|
||||
@@ -514,7 +514,7 @@ static void forward_htlc(struct htlc_in *hin,
|
||||
}
|
||||
|
||||
if (!check_ctlv(hin, cltv_expiry, outgoing_cltv_value,
|
||||
ld->config.deadline_blocks)) {
|
||||
ld->config.min_htlc_expiry)) {
|
||||
failcode = WIRE_INCORRECT_CLTV_EXPIRY;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -689,11 +689,11 @@ class LightningDTests(BaseLightningDTests):
|
||||
|
||||
baseroute = [ { 'msatoshi' : amt + fee,
|
||||
'id' : l2.info['id'],
|
||||
'delay' : 10,
|
||||
'delay' : 12,
|
||||
'channel' : chanid1 },
|
||||
{ 'msatoshi' : amt,
|
||||
'id' : l3.info['id'],
|
||||
'delay' : 5,
|
||||
'delay' : 6,
|
||||
'channel' : chanid2 } ]
|
||||
|
||||
# Unknown other peer
|
||||
|
||||
Reference in New Issue
Block a user