Skip to content

Commit

Permalink
Remove rest_types
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Sep 18, 2020
1 parent aa1d3fc commit 6e02e12
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 773 deletions.
28 changes: 1 addition & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ members = [
"common/lighthouse_version",
"common/logging",
"common/lru_cache",
"common/rest_types",
"common/slot_clock",
"common/test_random_derive",
"common/warp_utils",
Expand Down
1 change: 1 addition & 0 deletions beacon_node/http_metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ eth2_libp2p = { path = "../eth2_libp2p" }
slot_clock = { path = "../../common/slot_clock" }
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
lazy_static = "1.4.0"
eth2 = { path = "../../common/eth2" }

[dev-dependencies]
tokio = { version = "0.2.21", features = ["sync"] }
Expand Down
3 changes: 2 additions & 1 deletion beacon_node/http_metrics/src/metrics.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::Context;
use beacon_chain::BeaconChainTypes;
use lighthouse_metrics::{health::Health, Encoder, TextEncoder};
use eth2::lighthouse::Health;
use lighthouse_metrics::{Encoder, TextEncoder};

pub use lighthouse_metrics::*;

Expand Down
1 change: 0 additions & 1 deletion beacon_node/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ beacon_chain = { path = "../beacon_chain" }
store = { path = "../store" }
eth2_libp2p = { path = "../eth2_libp2p" }
hashset_delay = { path = "../../common/hashset_delay" }
rest_types = { path = "../../common/rest_types" }
types = { path = "../../consensus/types" }
state_processing = { path = "../../consensus/state_processing" }
slot_clock = { path = "../../common/slot_clock" }
Expand Down
3 changes: 1 addition & 2 deletions beacon_node/network/src/attestation_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ use slog::{crit, debug, error, o, trace, warn};
use beacon_chain::{BeaconChain, BeaconChainTypes};
use eth2_libp2p::{types::GossipKind, NetworkGlobals, SubnetDiscovery};
use hashset_delay::HashSetDelay;
use rest_types::ValidatorSubscription;
use slot_clock::SlotClock;
use types::{Attestation, EthSpec, Slot, SubnetId};
use types::{Attestation, EthSpec, Slot, SubnetId, ValidatorSubscription};

use crate::metrics;

Expand Down
3 changes: 1 addition & 2 deletions beacon_node/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ use eth2_libp2p::{
};
use eth2_libp2p::{MessageAcceptance, Service as LibP2PService};
use futures::prelude::*;
use rest_types::ValidatorSubscription;
use slog::{debug, error, info, o, trace, warn};
use std::{collections::HashMap, sync::Arc, time::Duration};
use store::HotColdDB;
use tokio::sync::mpsc;
use tokio::time::Delay;
use types::EthSpec;
use types::{EthSpec, ValidatorSubscription};

mod tests;

Expand Down
2 changes: 0 additions & 2 deletions common/eth2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ serde_json = "1.0.52"
types = { path = "../../consensus/types" }
hex = "0.4.2"
reqwest = { version = "0.10.8", features = ["json"] }
# TODO: remove rest_types dep.
rest_types = { path = "../rest_types" }
eth2_libp2p = { path = "../../beacon_node/eth2_libp2p" }
proto_array = { path = "../../consensus/proto_array", optional = true }

Expand Down
5 changes: 1 addition & 4 deletions common/eth2/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ use std::fmt;
use std::str::FromStr;
use types::serde_utils;

// TODO: remove this.
pub use rest_types::ValidatorSubscription;

pub use types::{
Address, Attestation, AttestationData, AttesterSlashing, BeaconBlock, BeaconBlockHeader,
BeaconState, Checkpoint, CommitteeIndex, Epoch, EthSpec, Fork, Graffiti, Hash256,
ProposerSlashing, PublicKeyBytes, SignatureBytes, SignedAggregateAndProof, SignedBeaconBlock,
SignedVoluntaryExit, Slot, Validator, YamlConfig,
SignedVoluntaryExit, Slot, Validator, ValidatorSubscription, YamlConfig,
};

/// An API error serializable to JSON.
Expand Down
27 changes: 0 additions & 27 deletions common/rest_types/Cargo.toml

This file was deleted.

99 changes: 0 additions & 99 deletions common/rest_types/src/api_error.rs

This file was deleted.

65 changes: 0 additions & 65 deletions common/rest_types/src/beacon.rs

This file was deleted.

Loading

0 comments on commit 6e02e12

Please sign in to comment.