]> git.bitcoin.ninja Git - rust-lightning/commit
Require a non-0 number of non-empty paths when deserializing routes
authorMatt Corallo <git@bluematt.me>
Mon, 6 Feb 2023 21:43:10 +0000 (21:43 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 27 Feb 2023 22:31:11 +0000 (22:31 +0000)
commit93641540229317b881f86b7a02eba632fd64eb0d
treee3bdaea3f23f3c2da9deed3ff7af336932e407ca
parentb5e5435c4e840a1b6a6ff0d552a7fa399fa5a424
Require a non-0 number of non-empty paths when deserializing routes

When we read a `Route` (or a list of `RouteHop`s), we should never
have zero paths or zero `RouteHop`s in a path. As such, its fine to
simply reject these at deserialization-time. Technically this could
lead to something which we can generate not round-trip'ing
serialization, but that seems okay here.
lightning/src/ln/channelmanager.rs
lightning/src/routing/router.rs