Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit 4036cfb

Browse files
authored
test: account for offset for first subscription (#302)
1 parent b5a2ee9 commit 4036cfb

File tree

1 file changed

+9
-2
lines changed
  • ethers-providers/src/transports

1 file changed

+9
-2
lines changed

Diff for: ethers-providers/src/transports/ipc.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,14 @@ mod test {
378378
let block = serde_json::from_value::<Block<TxHash>>(item).unwrap();
379379
blocks.push(block.number.unwrap_or_default().as_u64());
380380
}
381-
382-
assert_eq!(blocks, &[block_num + 1, block_num + 2, block_num + 3])
381+
let offset = blocks[0] - block_num;
382+
assert_eq!(
383+
blocks,
384+
&[
385+
block_num + offset,
386+
block_num + offset + 1,
387+
block_num + offset + 2
388+
]
389+
)
383390
}
384391
}

0 commit comments

Comments
 (0)