mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 14:24:44 +00:00
Fix clippy lints
This commit is contained in:
@@ -43,9 +43,9 @@ impl AttestationService for AttestationServiceInstance {
|
||||
let f = sink
|
||||
.fail(RpcStatus::new(
|
||||
RpcStatusCode::OutOfRange,
|
||||
Some(format!(
|
||||
"AttestationData request for a slot that is in the future."
|
||||
)),
|
||||
Some(
|
||||
"AttestationData request for a slot that is in the future.".to_string(),
|
||||
),
|
||||
))
|
||||
.map_err(move |e| {
|
||||
error!(log_clone, "Failed to reply with failure {:?}: {:?}", req, e)
|
||||
@@ -58,9 +58,7 @@ impl AttestationService for AttestationServiceInstance {
|
||||
let f = sink
|
||||
.fail(RpcStatus::new(
|
||||
RpcStatusCode::InvalidArgument,
|
||||
Some(format!(
|
||||
"AttestationData request for a slot that is in the past."
|
||||
)),
|
||||
Some("AttestationData request for a slot that is in the past.".to_string()),
|
||||
))
|
||||
.map_err(move |e| {
|
||||
error!(log_clone, "Failed to reply with failure {:?}: {:?}", req, e)
|
||||
|
||||
@@ -43,7 +43,7 @@ impl BeaconBlockService for BeaconBlockServiceInstance {
|
||||
let f = sink
|
||||
.fail(RpcStatus::new(
|
||||
RpcStatusCode::InvalidArgument,
|
||||
Some(format!("Invalid randao reveal signature")),
|
||||
Some("Invalid randao reveal signature".to_string()),
|
||||
))
|
||||
.map_err(move |e| warn!(log_clone, "failed to reply {:?}: {:?}", req, e));
|
||||
return ctx.spawn(f);
|
||||
@@ -114,7 +114,7 @@ impl BeaconBlockService for BeaconBlockServiceInstance {
|
||||
self.network_chan
|
||||
.send(NetworkMessage::Publish {
|
||||
topics: vec![topic],
|
||||
message,
|
||||
message: Box::new(message),
|
||||
})
|
||||
.unwrap_or_else(|e| {
|
||||
error!(
|
||||
|
||||
@@ -24,7 +24,7 @@ impl BeaconNodeService for BeaconNodeServiceInstance {
|
||||
// get the chain state
|
||||
let state = self.chain.get_state();
|
||||
let state_fork = state.fork.clone();
|
||||
let genesis_time = state.genesis_time.clone();
|
||||
let genesis_time = state.genesis_time;
|
||||
|
||||
// build the rpc fork struct
|
||||
let mut fork = Fork::new();
|
||||
@@ -35,7 +35,7 @@ impl BeaconNodeService for BeaconNodeServiceInstance {
|
||||
node_info.set_fork(fork);
|
||||
node_info.set_genesis_time(genesis_time);
|
||||
node_info.set_genesis_slot(self.chain.get_spec().genesis_slot.as_u64());
|
||||
node_info.set_chain_id(self.chain.get_spec().chain_id as u32);
|
||||
node_info.set_chain_id(u32::from(self.chain.get_spec().chain_id));
|
||||
|
||||
// send the node_info the requester
|
||||
let error_log = self.log.clone();
|
||||
|
||||
Reference in New Issue
Block a user