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

rpc-types-eth: rm PeerCount #1140

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions crates/rpc-types-eth/src/syncing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use alloy_primitives::{B512, U256, U64};
use alloy_primitives::{B512, U256};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::collections::BTreeMap;

Expand Down Expand Up @@ -47,16 +47,6 @@ pub struct Peers {
pub peers: Vec<PeerInfo>,
}

/// Number of peers connected to.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PeerCount {
/// Peer count as integer
Number(u32),
/// Peer count as hex
Hex(U64),
}

/// Peer connection information
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct PeerInfo {
Expand Down