mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-01 03:33:47 +00:00
Gloas spec v1.7.0-alpha.5 and beacon_chain tests (#8998)
Fix database pruning post-Gloas - Fix DB pruning logic (and state summaries DAG) - Get the `beacon_chain` tests running with `FORK_NAME=gloas` 🎉 Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com> Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com> Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
@@ -1389,13 +1389,18 @@ async fn attestation_to_finalized_block() {
|
||||
let earlier_block_root = earlier_block.canonical_root();
|
||||
assert_ne!(earlier_block_root, finalized_checkpoint.root);
|
||||
|
||||
// For Gloas, `block.state_root()` returns the pending state root, but the cold DB
|
||||
// may store the full state root. Use `get_cold_state_root` to get the actual stored key.
|
||||
let cold_state_root = harness
|
||||
.chain
|
||||
.store
|
||||
.get_cold_state_root(earlier_slot)
|
||||
.expect("should not error getting cold state root")
|
||||
.expect("cold state root should be present for finalized slot in archive store");
|
||||
|
||||
let mut state = harness
|
||||
.chain
|
||||
.get_state(
|
||||
&earlier_block.state_root(),
|
||||
Some(earlier_slot),
|
||||
CACHE_STATE_IN_TESTS,
|
||||
)
|
||||
.get_state(&cold_state_root, Some(earlier_slot), CACHE_STATE_IN_TESTS)
|
||||
.expect("should not error getting state")
|
||||
.expect("should find state");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user