Commit c924f1ec authored by gabi-250's avatar gabi-250 🕸️
Browse files

hsclient: Only replace the hsdesc with a more recent one (fmt)

parent 9d3d171b
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -488,8 +488,7 @@ impl<'c, R: Runtime, M: MocksForConnect<R>> Context<'c, R, M> {

        let now = self.runtime.wallclock();
        let unwrap_valid_desc = |data: &'d mut DataHsDesc| -> &'d HsDesc {
            data
                .as_ref()
            data.as_ref()
                .expect("Some but now None")
                .as_ref()
                .check_valid_at(&now)
@@ -504,8 +503,7 @@ impl<'c, R: Runtime, M: MocksForConnect<R>> Context<'c, R, M> {
        // TODO SPEC: Discuss HS descriptor lifetime and expiry client behaviour
        let now = self.runtime.wallclock();

        let cur_revision =
            if let Some(previously) = data {
        let cur_revision = if let Some(previously) = data {
            if let Ok(desc) = previously.as_ref().check_valid_at(&now) {
                Some(desc.revision())
            } else {