fn parameterize(
channels_params: &mut ChannelPaddingInstructions,
config: &ChannelConfig,
dormancy: Dormancy,
netdir: &NetParamsExtract,
) -> Result<Option<ChannelPaddingInstructionsUpdates>, Bug>
Expand description
Converts config, dormancy, and netdir, into parameter updates
Calculates new parameters, updating channels_params
as appropriate.
If anything changed, the corresponding update instruction is returned.
channels_params
is updated with the new parameters,
and the update message, if one is needed, is returned.
This is called in two places:
-
During chanmgr creation, it is called once to analyze the initial state and construct a corresponding ChannelPaddingInstructions.
-
During reconfiguration.