Tidy ancestor iterators (#490)

* Tidy ancestor iterators

* Improve comments, remove code fragement
This commit is contained in:
Paul Hauner
2019-08-08 12:28:10 +10:00
committed by GitHub
parent 66c7337e21
commit 3a1f56a42e
11 changed files with 123 additions and 201 deletions

View File

@@ -29,7 +29,11 @@ impl<T: BeaconChainTypes> ValidatorService for ValidatorServiceInstance<T> {
trace!(self.log, "RPC request"; "endpoint" => "GetValidatorDuties", "epoch" => req.get_epoch());
let spec = &self.chain.spec;
let state = &self.chain.current_state();
// TODO: this whole module is legacy and not maintained well.
let state = &self
.chain
.speculative_state()
.expect("This is legacy code and should be removed");
let epoch = Epoch::from(req.get_epoch());
let mut resp = GetDutiesResponse::new();
let resp_validators = resp.mut_active_validators();