MCPcopy Create free account
hub / github.com/ElementsProject/lightning / mark_failure

Method mark_failure

plugins/currencyrate-plugin/src/oracle.rs:189–194  ·  view source on GitHub ↗
(&mut self, error: String)

Source from the content-addressed store, hash-verified

187 }
188
189 fn mark_failure(&mut self, error: String) {
190 self.failures += 1;
191 let delay = INITIAL_BACKOFF * 2u32.pow(self.failures.min(10));
192 self.backoff_until = Instant::now() + delay.min(MAX_BACKOFF);
193 self.last_error = Some(error);
194 }
195}
196
197#[derive(Debug)]

Callers 2

refresh_currencyMethod · 0.80
background_refreshMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected