Randomize `user_channel_id` for inbound channels
authorElias Rohrer <ero@tnull.de>
Fri, 21 Oct 2022 09:05:18 +0000 (11:05 +0200)
committerElias Rohrer <ero@tnull.de>
Tue, 15 Nov 2022 14:10:38 +0000 (15:10 +0100)
commitb2f8df0b61bd42e38e0f25c906726b5af9c49825
treebe14717f277b7a6dbb5d3f6b9ea6586e009dea87
parentaa10f6464efa797ccda35d59fef8faac083c3438
Randomize `user_channel_id` for inbound channels

Previously, all inbound channels defaulted to a `user_channel_id` of 0,
which didn't allow for them being discerned on that basis. Here, we
simply randomize the identifier to fix this and enable the use of
`user_channel_id` as a true identifier for channels (assuming an equally
reasonable value is chosen for outbound channels and given upon
`create_channel()`).
lightning/src/ln/channelmanager.rs