Skip to content

Commit c76ed4b

Browse files
committed
bugfix: Exponent base should be 2 yikes
1 parent 10b4f22 commit c76ed4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

node/src/api/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const DEFAULT_RETRIES: usize = 0;
2828

2929
// Exponential backup
3030
const INITIAL_WAIT_MS: u64 = 250;
31-
const EXP_MULTIPLE: u64 = 250;
3231
const MAXIMUM_WAIT_MS: u64 = 32_000;
32+
const EXP_BASE: u64 = 2;
3333

3434
// Avoid `Method::` prefix. Associated constants can't be imported
3535
const GET: Method = Method::GET;
@@ -218,7 +218,7 @@ impl LexeApiClient {
218218

219219
// Exponential backup
220220
let mut backup_durations = (0..)
221-
.map(|index| INITIAL_WAIT_MS * EXP_MULTIPLE.pow(index))
221+
.map(|index| INITIAL_WAIT_MS * EXP_BASE.pow(index))
222222
.map(|wait| min(wait, MAXIMUM_WAIT_MS))
223223
.map(Duration::from_millis);
224224

0 commit comments

Comments
 (0)