Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshing casper-node dependency, refactoring tests for 'chain_get_e… #395

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

zajko
Copy link
Contributor

@zajko zajko commented Jan 22, 2025

…ra_info_by_switch_block'

@zajko zajko force-pushed the seniorage_allocation_refresh branch 2 times, most recently from 738f9d0 to c2f3d2e Compare January 22, 2025 15:06
@zajko zajko force-pushed the seniorage_allocation_refresh branch from c2f3d2e to 6dee528 Compare January 22, 2025 15:19
@zajko zajko requested a review from mpapierski January 24, 2025 09:04
rust-toolchain.toml Outdated Show resolved Hide resolved
Comment on lines 949 to 950
let ends_with_id = Regex::new(r"\nid:\d*$").unwrap();
let starts_with_data = Regex::new(r"^data:").unwrap();

Choose a reason for hiding this comment

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

Since you're at it let's make these static ENDS_WITH_ID_REGEX: Lazy<Regex> = Lazy::new(...) - I'm not sure if regex crate memorizes already compiled regexes internally (why would they?). Compile times are non-trivial, so paying the cost once is better. (https://docs.rs/regex/latest/regex/#avoid-re-compiling-regexes-especially-in-a-loop)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, sure 👍

@zajko zajko merged commit 7a22f99 into casper-network:feat-2.0 Jan 24, 2025
2 checks passed
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