MCPcopy Create free account
hub / github.com/EvoMap/evolver / pickDelay

Function pickDelay

src/gep/validator/stakeBootstrap.js:169–185  ·  view source on GitHub ↗
(kind)

Source from the content-addressed store, hash-verified

167}
168
169function pickDelay(kind) {
170 if (kind === 'transient') {
171 const idx = Math.min(
172 Math.max(0, _state.transientFailures - 1),
173 BACKOFF_STEPS_TRANSIENT_MS.length - 1,
174 );
175 return BACKOFF_STEPS_TRANSIENT_MS[idx];
176 }
177 if (kind === 'funds') {
178 const idx = Math.min(
179 Math.max(0, _state.fundsFailures - 1),
180 BACKOFF_STEPS_FUNDS_MS.length - 1,
181 );
182 return BACKOFF_STEPS_FUNDS_MS[idx];
183 }
184 return 5 * 60 * 1000;
185}
186
187function classifyFailure(status, errorText) {
188 const text = String(errorText || '').toLowerCase();

Callers 1

ensureValidatorStakeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected