]> git.bitcoin.ninja Git - rust-lightning/commit
Do not panic if a peer learns our funding info before we fund
authorMatt Corallo <git@bluematt.me>
Tue, 26 Dec 2023 18:16:51 +0000 (18:16 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 29 Dec 2023 06:27:31 +0000 (06:27 +0000)
commit5eea3058c921aa4c0739dc10565ee8d236302274
tree21ae8bea0473f3f35d7327124afbd1fe8306ebfc
parentbfe911dadcd31ec0e3a2e866d3e154e9781498a4
Do not panic if a peer learns our funding info before we fund

We'd previously assumed that LDK would receive
`funding_transaction_generated` prior to our peer learning the txid
and panicked if the peer tried to open a redundant channel to us
with the same funding outpoint.

While this assumption is generally safe, some users may have
out-of-band protocols where they notify their LSP about a funding
outpoint first, or this may be violated in the future with
collaborative transaction construction protocols, i.e. the upcoming
dual-funding protocol.
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs