channel params: Rename initial_update (from total_update)

The semantics of this are going to become a bit more subtle.
This commit is contained in:
Ian Jackson 2022-07-08 14:09:40 +01:00
parent 35c8c3cd1b
commit cc731cef49
2 changed files with 4 additions and 4 deletions

View File

@ -219,7 +219,7 @@ impl<CF: ChannelFactory> AbstractChanMgr<CF> {
// manager lock acquisition span as the one where we insert the
// channel into the table so it will receive updates. I.e.,
// here.
chan.reparameterize(channels_params.total_update().into())
chan.reparameterize(channels_params.initial_update().into())
.map_err(|()| internal!("new channel already closed"))?;
Ok(Open(OpenEntry {
channel: chan.clone(),

View File

@ -19,7 +19,7 @@ use super::padding;
/// ```ignore
/// pub struct ChannelsParams { ... } // containing the fields as specified
/// pub struct ChannelsParamsUpdates { ... } // containing `Option` of each field
/// pub fn ChannelsParams::total_update(&self) -> ChannelsParamsUpdates;
/// pub fn ChannelsParams::initial_update(&self) -> ChannelsParamsUpdates;
/// pub fn ChannelsParamsUpdatesBuilder::$field(self, new_value: _) -> Self;
/// ```
///
@ -78,8 +78,8 @@ macro_rules! define_channels_params_and_automatic_impls { { $(
/// Create an update message which sets *all* of the settings in `self`
///
/// Used during channel startup.
#[must_use = "total_update makes an updates message that must be sent to have effect"]
pub fn total_update(&self) -> ChannelsParamsUpdates {
#[must_use = "initial_update makes an updates message that must be sent to have effect"]
pub fn initial_update(&self) -> ChannelsParamsUpdates {
ChannelsParamsUpdates {
$(
$field: Some(self.$field.clone()),