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

@@ -40,7 +40,11 @@ impl<T: BeaconChainTypes> AttestationService for AttestationServiceInstance<T> {
// verify the slot, drop lock on state afterwards
{
let slot_requested = req.get_slot();
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");
// Start by performing some checks
// Check that the AttestationData is for the current slot (otherwise it will not be valid)