lighthouse-pulse/lighthouse/tests
Jimmy Chen 245e922c7b Improve testing slot clock to allow manipulation of time in tests (#3974)
## Issue Addressed

I discovered this issue while implementing [this test](https://github.com/jimmygchen/lighthouse/blob/test-example/beacon_node/network/src/beacon_processor/tests.rs#L895), where I tried to manipulate the slot clock with: 

`rig.chain.slot_clock.set_current_time(duration);`

however the change doesn't get reflected in the `slot_clock` in `ReprocessQueue`, and I realised `slot_clock` was cloned a few times in the code, and therefore changing the time in `rig.chain.slot_clock` doesn't have any effect in `ReprocessQueue`.

I've incorporated the suggestion from the @paulhauner and @michaelsproul - wrapping the `ManualSlotClock.current_time` (`RwLock<Duration>)` in an `Arc`, and the above test now passes. 

Let's see if this breaks any existing tests :)
2023-02-16 23:34:32 +00:00
..
account_manager.rs Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
beacon_node.rs Improve testing slot clock to allow manipulation of time in tests (#3974) 2023-02-16 23:34:32 +00:00
boot_node.rs Update discv5 (#3171) 2022-10-28 05:40:06 +00:00
exec.rs Enforce Optimistic Sync Conditions & CLI Tests (v2) (#3050) 2022-03-01 22:56:47 +00:00
main.rs Add regression tests for boot_node (#2749) 2021-11-08 01:37:58 +00:00
validator_client.rs Enable proposer boost re-orging (#2860) 2022-12-13 09:57:26 +00:00