Fix tree-states tests after latest update (#5528)

* Fix clippy

* Fix beacon chain tests

* Comment out dodgy iterator test

* Fix imports for beta compiler
This commit is contained in:
Michael Sproul
2024-04-08 09:40:33 +10:00
committed by GitHub
parent 0d9fb5a755
commit 8705ac507b
10 changed files with 31 additions and 33 deletions

View File

@@ -170,7 +170,7 @@ async fn voluntary_exit_duplicate_in_state() {
.validators()
.get(exited_validator as usize)
.unwrap()
.exit_epoch,
.exit_epoch(),
spec.far_future_epoch
);
@@ -274,14 +274,12 @@ async fn proposer_slashing_duplicate_in_state() {
.await;
// Verify validator is actually slashed.
assert!(
harness
.get_current_state()
.validators()
.get(slashed_validator as usize)
.unwrap()
.slashed
);
assert!(harness
.get_current_state()
.validators()
.get(slashed_validator as usize)
.unwrap()
.slashed());
// Clear the in-memory gossip cache & try to verify the same slashing on gossip.
// It should still fail because gossip verification should check the validator's `slashed` field
@@ -402,14 +400,12 @@ async fn attester_slashing_duplicate_in_state() {
.await;
// Verify validator is actually slashed.
assert!(
harness
.get_current_state()
.validators()
.get(slashed_validator as usize)
.unwrap()
.slashed
);
assert!(harness
.get_current_state()
.validators()
.get(slashed_validator as usize)
.unwrap()
.slashed());
// Clear the in-memory gossip cache & try to verify the same slashing on gossip.
// It should still fail because gossip verification should check the validator's `slashed` field