add scheduling note to on_attestation

This commit is contained in:
Danny Ryan 2019-11-12 16:24:33 -07:00
parent 74253bdbaf
commit 117fb12888
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A

View File

@ -238,6 +238,12 @@ def on_block(store: Store, block: BeaconBlock) -> None:
```python
def on_attestation(store: Store, attestation: Attestation) -> None:
"""
Run ``on_attestation`` upon receiving a new ``attestation`` from either within a block or directly on the wire.
An ``attestation`` that is asserted as invalid may be valid at a later time,
consider scheduling it for later processing in such case.
"""
target = attestation.data.target
# Attestations must be from the current or previous epoch