chanmgr testing: FakeChannel: retain the ChannelsParamsUpdates

This commit is contained in:
Ian Jackson 2022-08-02 11:07:18 +01:00
parent 7ae60c229b
commit e4e06f66ec
1 changed files with 4 additions and 1 deletions

View File

@ -346,6 +346,7 @@ mod test {
mood: char,
closing: Arc<AtomicBool>,
detect_reuse: Arc<char>,
last_params: Option<ChannelsParamsUpdates>,
}
impl PartialEq for FakeChannel {
@ -365,7 +366,8 @@ mod test {
fn duration_unused(&self) -> Option<Duration> {
None
}
fn reparameterize(&mut self, _updates: Arc<ChannelsParamsUpdates>) -> tor_proto::Result<()> {
fn reparameterize(&mut self, updates: Arc<ChannelsParamsUpdates>) -> tor_proto::Result<()> {
self.last_params = Some((*updates).clone());
Ok(())
}
fn note_usage(&self, _usage: ChannelUsage) -> StdResult<(), tor_error::Bug> {
@ -412,6 +414,7 @@ mod test {
mood,
closing: Arc::new(AtomicBool::new(false)),
detect_reuse: Default::default(),
last_params: None,
})
}
}