-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore(sdk): Add MaybeArbitrary as super trait #12661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
crates/primitives/src/block.rs
Outdated
@@ -427,7 +427,7 @@ impl SealedBlock { | |||
return Err(GotExpected { | |||
got: calculated_root, | |||
expected: self.header.transactions_root, | |||
}) | |||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | |
}) |
pls revert unrelated formatting change (use cargo +nightly fmt
instead of cargo fmt
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I have updated the fmt setting of rust-analyzer :)
crates/primitives/src/block.rs
Outdated
@@ -467,6 +467,7 @@ impl<H, B> reth_primitives_traits::Block for SealedBlock<H, B> | |||
where | |||
H: reth_primitives_traits::BlockHeader + 'static, | |||
B: reth_primitives_traits::BlockBody + 'static, | |||
SealedHeader<H>: MaybeArbitrary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this bound here, relax the arbitrary impl for SealedHeader
#[cfg(any(test, feature = "arbitrary"))]
impl<'a, H> arbitrary::Arbitrary<'a> for SealedHeader<H> where H: for<'a> arbitrary::Arbitrary<'a> {
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> {
let header = Header::arbitrary(u)?;
Ok(Self::seal(header))
}
}
Some checks were not successful, should I do something? There is an import order error in |
I will check it out |
Closes #12582.