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

sdk: evict unchecked_div_by_const #3933

Closed
wants to merge 1 commit into from

Conversation

buffalojoec
Copy link

Problem

Working toward evicting RentCollector from the SDK, this is the lowest leaf node dependency that needs to be split out.

See #3932

Summary of Changes

Split unchecked_div_by_const into its own crate.

@kevinheavey
Copy link

I'm fine to pull this out but in #3855 I Just replace it with a constant and a static assertion:

// the !=0 check was previously done by the unchecked_div_by_const macro
#[cfg(test)]
static_assertions::const_assert!(DEFAULT_TICKS_PER_SECOND != 0);
const DEFAULT_SLEEP_MICROS: u64 = (1000 * 1000) / DEFAULT_TICKS_PER_SECOND;

Do we use the macro anywhere else?

@joncinque
Copy link

It doesn't look like it's used outside of poh-config, which was already extracted, so we'll probably be fine without this. @buffalojoec is the extracted solana-poh-config good enough for SVM?

@buffalojoec
Copy link
Author

I'm fine to pull this out but in #3855 I Just replace it with a constant and a static assertion:

Oh nice, yeah that's fine with me. I'll close this one, and I can move up my stack.

is the extracted solana-poh-config good enough for SVM?

Yep, I just needed it to move toward RentCollector.

@buffalojoec buffalojoec closed this Dec 5, 2024
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