]> git.bitcoin.ninja Git - rust-lightning/commit
Don't unwrap() get_channel_update result in HTLC router
authorMatt Corallo <git@bluematt.me>
Sun, 18 Nov 2018 21:15:08 +0000 (16:15 -0500)
committerMatt Corallo <git@bluematt.me>
Sun, 18 Nov 2018 21:17:06 +0000 (16:17 -0500)
commite67d8c6314c4fce465e41652b539f83d0a8c4887
tree096ff38ba349b43cbef646e178c3ea1f79880734
parentb4fc5b65e06e97e94aa5f6bd84fb25f4ce208c6b
Don't unwrap() get_channel_update result in HTLC router

This fixes a bug in 78232f2aeded08b32fa4ebfeb0b77d80b337518d found
by fuzzer - if the channel isn't yet fully established we will call
get_channel_update(), get an Err result, and then unwrap() it. If
this actually happens it means someone on the network is making up
short_channel_ids and trying to route over them, but that shouldn't
result in us crashing
src/ln/channelmanager.rs