lighthouse/beacon_node/beacon_chain
Paul Hauner 7a64994283 Call per_slot_task from a blocking thread (v2) (#3199)
*This PR was adapted from @pawanjay176's work in #3197.*

## Issue Addressed

Fixes a regression in https://github.com/sigp/lighthouse/pull/3168

## Proposed Changes

https://github.com/sigp/lighthouse/pull/3168 added calls to `fork_choice` in  `BeaconChain::per_slot_task` function. This leads to a panic as `per_slot_task` is called from an async context which calls fork choice, which then calls `block_on`.

This PR changes the timer to call the `per_slot_task` function in a blocking thread.

Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
2022-05-20 23:05:07 +00:00
..
src Call per_slot_task from a blocking thread (v2) (#3199) 2022-05-20 23:05:07 +00:00
tests Prevent attestation to future blocks from early attester cache (#3183) 2022-05-17 01:51:25 +00:00
Cargo.toml Allow TaskExecutor to be used in async tests (#3178) 2022-05-16 08:35:59 +00:00