mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Fix failing tests (#4423)
* Get tests passing * Get benchmarks compiling * Fix EF withdrawals test * Remove unused deps * Fix tree_hash panic in tests * Fix slasher compilation * Fix ssz_generic test * Get more tests passing * Fix EF tests for real * Fix local testnet scripts
This commit is contained in:
@@ -1249,7 +1249,12 @@ mod release_tests {
|
||||
// Each validator will have a multiple of 1_000_000_000 wei.
|
||||
// Safe from overflow unless there are about 18B validators (2^64 / 1_000_000_000).
|
||||
for i in 0..state.validators().len() {
|
||||
state.validators_mut().get_mut(i).unwrap().effective_balance = 1_000_000_000 * i as u64;
|
||||
state
|
||||
.validators_mut()
|
||||
.get_mut(i)
|
||||
.unwrap()
|
||||
.mutable
|
||||
.effective_balance = 1_000_000_000 * i as u64;
|
||||
}
|
||||
|
||||
let num_validators = num_committees
|
||||
@@ -1507,9 +1512,24 @@ mod release_tests {
|
||||
let spec = &harness.spec;
|
||||
let mut state = harness.get_current_state();
|
||||
let op_pool = OperationPool::<MainnetEthSpec>::new();
|
||||
state.validators_mut()[1].effective_balance = 17_000_000_000;
|
||||
state.validators_mut()[2].effective_balance = 17_000_000_000;
|
||||
state.validators_mut()[3].effective_balance = 17_000_000_000;
|
||||
state
|
||||
.validators_mut()
|
||||
.get_mut(1)
|
||||
.unwrap()
|
||||
.mutable
|
||||
.effective_balance = 17_000_000_000;
|
||||
state
|
||||
.validators_mut()
|
||||
.get_mut(2)
|
||||
.unwrap()
|
||||
.mutable
|
||||
.effective_balance = 17_000_000_000;
|
||||
state
|
||||
.validators_mut()
|
||||
.get_mut(3)
|
||||
.unwrap()
|
||||
.mutable
|
||||
.effective_balance = 17_000_000_000;
|
||||
|
||||
let slashing_1 = harness.make_attester_slashing(vec![1, 2, 3]);
|
||||
let slashing_2 = harness.make_attester_slashing(vec![4, 5, 6]);
|
||||
|
||||
Reference in New Issue
Block a user