Address Michael's comments

This commit is contained in:
Paul Hauner
2019-11-25 15:11:27 +11:00
parent 6bf73e2b55
commit 65cbf601ae
11 changed files with 42 additions and 54 deletions

View File

@@ -525,7 +525,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
}
}
/// Produce an `Attestation` that is valid for the given `slot` `shard`.
/// Produce an `Attestation` that is valid for the given `slot` and `index`.
///
/// Always attests to the canonical chain.
pub fn produce_attestation(
@@ -870,8 +870,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
result
};
if block.slot > 0
&& (block.slot <= finalized_epoch.start_slot(T::EthSpec::slots_per_epoch()))
if block.slot > 0 && block.slot <= finalized_epoch.start_slot(T::EthSpec::slots_per_epoch())
{
// Ignore any attestation where the slot of `data.beacon_block_root` is equal to or
// prior to the finalized epoch.