]> git.bitcoin.ninja Git - rust-lightning/commit
Increase the CLTV delay required on payments and forwards
authorMatt Corallo <git@bluematt.me>
Wed, 5 May 2021 02:04:58 +0000 (02:04 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 5 May 2021 20:09:11 +0000 (20:09 +0000)
commite84f5edbc5b959c7bbad17b5968f2c9e32df68df
tree595fc85d21369df7987c3487739eb1442032c465
parentc60543c0ed9f1c469fb8b1836ef7796c696642f3
Increase the CLTV delay required on payments and forwards

This increases the CLTV_CLAIM_BUFFER constant to 18, much better
capturing how long it takes to go on chain to claim payments.
This is also more in line with other clients, and the spec, which
sets the default CLTV delay in invoices to 18.

As a side effect, we have to increase MIN_CLTV_EXPIRY_DELTA as
otherwise as are subject to an attack where someone can hold an
HTLC being forwarded long enough that we *also* close the channel
on which we received the HTLC.
fuzz/src/full_stack.rs
lightning-invoice/src/utils.rs
lightning/src/chain/channelmonitor.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs