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

refactor: BlockchainTestCase::run rm repetitive convert ForkSpec to ChainSpec #11896

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nkysg
Copy link
Contributor

@nkysg nkysg commented Oct 19, 2024

It seems that From<ForkSpec> for ChainSpec should be From<&ForkSpec> for ChainSpec, we don't consume ForkSpec.
It seems that chain_spec we can only calc once.

@nkysg nkysg requested a review from gakonst as a code owner October 19, 2024 15:52
@nkysg nkysg marked this pull request as draft October 19, 2024 15:54
@nkysg nkysg marked this pull request as ready for review October 19, 2024 15:58
@nkysg nkysg changed the title refactor: BlockchainTestCase::run rm repetitive ForkSpec to ChainSpec refactor: BlockchainTestCase::run rm repetitive convert ForkSpec to ChainSpec Oct 19, 2024
@@ -313,11 +313,11 @@ pub enum ForkSpec {
Unknown,
}

impl From<ForkSpec> for ChainSpec {
fn from(fork_spec: ForkSpec) -> Self {
impl From<&ForkSpec> for ChainSpec {
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, converting this & does make much sense for copy types, especially if we do *fork_spec later

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.

2 participants