]> git.bitcoin.ninja Git - rust-lightning/commit
[netgraph] Do not allow capacity_sats * 1000 to overflow-panic
authorMatt Corallo <git@bluematt.me>
Thu, 12 Nov 2020 23:59:06 +0000 (18:59 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 23 Nov 2020 18:52:51 +0000 (13:52 -0500)
commit423073dfe53ee56b464fa042fe9b8f635a78c2f1
tree13943c5c56efcf4e5844310c53f283f965c68bdf
parent50b348c4fa7079dcb008d3d5cf8ebc18e5200874
[netgraph] Do not allow capacity_sats * 1000 to overflow-panic

In updating the router fuzzer, it discovered that a remote peer can
cause us to overflow while multiplying the channel capacity value.
Since the value should never exceed 21 million BTC, we just add a
check for that.
lightning/src/routing/network_graph.rs