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

chore(net): move reth_eth_wire::DisconnectReason to reth-eth-wire-types #10006

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

emhane
Copy link
Member

@emhane emhane commented Aug 1, 2024

Ref #10002

@emhane emhane added C-debt Refactor of code section that is hard to understand or maintain A-networking Related to networking in general labels Aug 1, 2024
@emhane emhane marked this pull request as draft August 1, 2024 19:17
@emhane
Copy link
Member Author

emhane commented Aug 1, 2024

unsure why I get this error @Rjected @mattsse @DaniPopes ?

error[E0277]: the trait bound `reth_eth_wire_types::DisconnectReason: arbitrary::Arbitrary<'_>` is not satisfied
   --> crates/net/eth-wire/src/p2pstream.rs:654:16
    |
654 |     Disconnect(DisconnectReason),
    |                ^^^^^^^^^^^^^^^^ the trait `arbitrary::Arbitrary<'_>` is not implemented for `reth_eth_wire_types::DisconnectReason`

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

supportive, you're just missing eth-wire-types with arbitrary enabled as dev dep like

reth-primitives = { workspace = true, features = ["arbitrary"] }

@emhane
Copy link
Member Author

emhane commented Aug 2, 2024

reth-primitives = { workspace = true, features = ["arbitrary"] }

it is already

@emhane emhane requested a review from mattsse August 2, 2024 15:34
@mattsse mattsse marked this pull request as ready for review August 2, 2024 15:35
@mattsse
Copy link
Collaborator

mattsse commented Aug 2, 2024

the arb tests are usually feature gated like this #[cfg(any(test, feature = "arbitrary"))] which requires dev dep with arb feature for test

@emhane I assume this can also be moved

/// This represents only the reserved `p2p` subprotocol messages.
#[derive_arbitrary(rlp)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum P2PMessage {

@mattsse mattsse enabled auto-merge August 2, 2024 15:39
@mattsse mattsse added this pull request to the merge queue Aug 2, 2024
Merged via the queue into main with commit 34f4b6e Aug 2, 2024
32 checks passed
@mattsse mattsse deleted the emhane/mv-disconnect-reason-to-types branch August 2, 2024 16:05
martinezjorge pushed a commit to martinezjorge/reth that referenced this pull request Aug 7, 2024
…types` (paradigmxyz#10006)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Related to networking in general C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants