Skip to content

Conversation

@LeoPatOZ
Copy link
Collaborator

  • Unit tests for builder and scanner

@LeoPatOZ LeoPatOZ requested a review from 0xNeshi September 11, 2025 07:42
@LeoPatOZ LeoPatOZ changed the base branch from main to channels September 11, 2025 12:01
fmt

git

import
}

pub fn with_blocks_read_per_epoch(&mut self, blocks_read_per_epoch: u64) -> &mut Self {
// TODO: Clamp this value to a reasonable range
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a DEFAULT_BLOCKS_READ_PER_EPOCH value set by default, isn't it safe to assume that the dev overriding this value knows what they're doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i guess should be fine, I think the get_Logs will fail otherwise

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i guess should be fine, I think the get_Logs will fail otherwise.

This is a config param set by the node operators https://github.com/paradigmxyz/reth/blob/edc1ae8f4dd7d222e3de986794b2d0082fed65af/crates/rpc/rpc-server-types/src/constants.rs#L13 so ultimately its up to them

const WS_URL: &str = "ws://localhost:8545";

#[test]
fn test_builder_new_defaults() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although we're changing the design, these tests might come in handy for the event scanner, so we might as well keep them temporarily

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah wasnt sure what to do as we transition

@0xNeshi
Copy link
Collaborator

0xNeshi commented Sep 11, 2025

Overall, solid base test cases ✅

Base automatically changed from channels to main September 12, 2025 06:43
@0xNeshi 0xNeshi merged commit 2a74b92 into main Sep 12, 2025
6 checks passed
@0xNeshi 0xNeshi deleted the unit-tests branch September 12, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants