mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Fix stale beacon_state_root in test helpers (#9289)
Test helpers `add_attested_block_at_slot` and `add_attested_blocks_at_slot` accepted `state_root` argument which was computed before applying the block. Co-Authored-By: hopinheimer <knmanas6@gmail.com>
This commit is contained in:
@@ -105,11 +105,11 @@ async fn test_sync_committee_rewards() {
|
||||
|
||||
// Add block
|
||||
let chain = &harness.chain;
|
||||
let (head_state, head_state_root) = harness.get_current_state_and_root();
|
||||
let head_state = harness.get_current_state();
|
||||
let target_slot = harness.get_current_slot() + 1;
|
||||
|
||||
let (block_root, mut state) = harness
|
||||
.add_attested_block_at_slot(target_slot, head_state, head_state_root, &[])
|
||||
.add_attested_block_at_slot(target_slot, head_state, &[])
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user