mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
Fix Route
serialization round-trip
When the `max_total_routing_fee_msat` parameter was added to `RouteParameters`, the serialization used `map` to get the max fee, accidentally writing an `Option<Option<u64>>`, but then read it as an `Option<u64>`. Thus, any `Route`s with a `route_params` written will fail to be read back. Luckily, this is an incredibly rarely-used bit of code, so only one user managed to hit it.
This commit is contained in:
parent
2ada7911b1
commit
4026d4efd1
1 changed files with 1 additions and 1 deletions
|
@ -526,7 +526,7 @@ impl Writeable for Route {
|
|||
(1, self.route_params.as_ref().map(|p| &p.payment_params), option),
|
||||
(2, blinded_tails, optional_vec),
|
||||
(3, self.route_params.as_ref().map(|p| p.final_value_msat), option),
|
||||
(5, self.route_params.as_ref().map(|p| p.max_total_routing_fee_msat), option),
|
||||
(5, self.route_params.as_ref().and_then(|p| p.max_total_routing_fee_msat), option),
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue