Skip to content

Commit

Permalink
update usages of deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Jul 9, 2023
1 parent 29d306e commit 4ba6d74
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions mev-build-rs/src/mempool_builder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use async_trait::async_trait;
use beacon_api_client::{BeaconProposerRegistration, Client, ProposerDuty};
use beacon_api_client::{mainnet::Client, BeaconProposerRegistration, ProposerDuty};
use ethereum_consensus::{
clock::{convert_timestamp_to_slot, get_current_unix_time_in_secs},
crypto::SecretKey,
Expand Down Expand Up @@ -159,7 +159,8 @@ impl Builder {
// TODO update method on Context
.unwrap_or(self.context.min_genesis_time + self.context.genesis_delay);
let slot =
convert_timestamp_to_slot(*timestamp, genesis_time, self.context.seconds_per_slot);
convert_timestamp_to_slot(*timestamp, genesis_time, self.context.seconds_per_slot)
.expect("after genesis");
let coordinate = Coordinate { slot, parent_hash };
let mut state = self.state.lock();
tracing::trace!("at {coordinate:?}, inserting build job from engine API: {job:?}");
Expand Down
2 changes: 1 addition & 1 deletion mev-build-rs/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Service {
let block_provider = builder.clone();
let engine_builder = builder.clone();

let current_epoch = clock.current_epoch();
let current_epoch = clock.current_epoch().expect("after genesis");
builder.initialize(current_epoch).await;

let clock = tokio::spawn(async move {
Expand Down
3 changes: 2 additions & 1 deletion mev-rs/src/blinded_block_provider/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use crate::{
};
use axum::http::StatusCode;
use beacon_api_client::{
api_error_or_ok, ApiResult, Client as BeaconApiClient, Error as ApiError, VersionedValue,
api_error_or_ok, mainnet::Client as BeaconApiClient, ApiResult, Error as ApiError,
VersionedValue,
};

/// A `Client` for a service implementing the Builder APIs.
Expand Down
2 changes: 1 addition & 1 deletion mev-rs/src/blinded_block_provider/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl IntoResponse for Error {
fn into_response(self) -> Response {
let message = self.to_string();
let code = StatusCode::BAD_REQUEST;
(code, Json(ApiError { code, message })).into_response()
(code, Json(ApiError::ErrorMessage { code, message })).into_response()
}
}

Expand Down
4 changes: 3 additions & 1 deletion mev-rs/src/proposer_scheduler.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use beacon_api_client::{BeaconProposerRegistration, Client, Error as ApiError, ProposerDuty};
use beacon_api_client::{
mainnet::Client, BeaconProposerRegistration, Error as ApiError, ProposerDuty,
};
use ethereum_consensus::primitives::{BlsPublicKey, Epoch, Slot};
use parking_lot::Mutex;
use std::collections::HashMap;
Expand Down
4 changes: 3 additions & 1 deletion mev-rs/src/validator_registry.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::{signing::verify_signed_builder_message, types::SignedValidatorRegistration};
use beacon_api_client::{Client, Error as ApiError, StateId, ValidatorStatus, ValidatorSummary};
use beacon_api_client::{
mainnet::Client, Error as ApiError, StateId, ValidatorStatus, ValidatorSummary,
};
use ethereum_consensus::{
builder::ValidatorRegistration,
primitives::{BlsPublicKey, ExecutionAddress, ValidatorIndex},
Expand Down

0 comments on commit 4ba6d74

Please sign in to comment.