Expose API to update a channel's ChannelConfig
authorWilmer Paulino <wilmer.paulino@gmail.com>
Tue, 14 Jun 2022 23:41:32 +0000 (16:41 -0700)
committerWilmer Paulino <wilmer.paulino@gmail.com>
Mon, 20 Jun 2022 20:12:48 +0000 (13:12 -0700)
commit3dff4abfb1610862920ea36765424b609887ab2f
tree60aa9f7b6d735744819319371b60af42b1584a20
parentdfd56793a77fa92ed36f6951dcb4e93c250376c4
Expose API to update a channel's ChannelConfig

A new `update_channel_config` method is exposed on the `ChannelManger`
to update the `ChannelConfig` for a set of channels atomically. New
`ChannelUpdate` events are generated for each eligible channel.

Note that as currently implemented, a buggy and/or
auto-policy-management client could spam the network with updates as
there is no rate-limiting in place. This could already be done with
`broadcast_node_announcement`, though users are less inclined to update
that as frequently as its data is mostly static.
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/onion_route_tests.rs