lighthouse/beacon_node/beacon_chain
Michael Sproul fcf8419c90 Allow truncation of pubkey cache on creation (#1686)
## Issue Addressed

Closes #1680

## Proposed Changes

This PR fixes a race condition in beacon node start-up whereby the pubkey cache could be created by the beacon chain builder before the `PersistedBeaconChain` was stored to disk. When the node restarted, it would find the persisted chain missing, and attempt to start from scratch, creating a new pubkey cache in the process. This call to `ValidatorPubkeyCache::new` would fail if the file already existed (which it did). I changed the behaviour so that pubkey cache initialization now doesn't care whether there's a file already in existence (it's only a cache after all). Instead it will truncate and recreate the file in the race scenario described.
2020-09-30 04:42:52 +00:00
..
src Allow truncation of pubkey cache on creation (#1686) 2020-09-30 04:42:52 +00:00
tests Add gossip conditions from spec v0.12.3 (#1667) 2020-09-27 20:59:40 +00:00
Cargo.toml Avoid Printing Binary String to Logs (#1576) 2020-09-05 05:46:25 +00:00