Getting regular endpoint functions to return futures.

- Wrapped endpoint functions in new into_boxfut function
 - Undid changes to Network API service, now returning ApiResult again.
 - Cleaning up of functions, and removal of success_response functions in updated endpoints.
 - A bunch of other clean-ups.
This commit is contained in:
Luke Anderson
2019-09-12 15:20:31 +10:00
parent 82f4303787
commit cd8f40b4b7
7 changed files with 50 additions and 52 deletions

View File

@@ -63,12 +63,12 @@ impl<'a, B: BeaconNodeBlock, S: Signer, E: EthSpec> BlockProducer<'a, B, S, E> {
pub fn handle_produce_block(&mut self) {
match self.produce_block() {
Ok(ValidatorEvent::BlockProduced(slot)) => info!(
log,
self.log,
"Block produced";
"validator" => format!("{}", self.signer),
"slot" => slot,
),
Err(e) => error!(log, "Block production error"; "Error" => format!("{:?}", e)),
Err(e) => error!(self.log, "Block production error"; "Error" => format!("{:?}", e)),
Ok(ValidatorEvent::SignerRejection(_slot)) => {
error!(self.log, "Block production error"; "Error" => "Signer Could not sign the block".to_string())
}