Implement tree states & hierarchical state DB

This commit is contained in:
Michael Sproul
2023-06-19 10:14:47 +10:00
parent 2bb62b7f7d
commit 23db089a7a
193 changed files with 6093 additions and 5925 deletions

View File

@@ -24,11 +24,11 @@ impl JustifiedBalances {
.validators()
.iter()
.map(|validator| {
if !validator.slashed && validator.is_active_at(current_epoch) {
total_effective_balance.safe_add_assign(validator.effective_balance)?;
if !validator.slashed() && validator.is_active_at(current_epoch) {
total_effective_balance.safe_add_assign(validator.effective_balance())?;
num_active_validators.safe_add_assign(1)?;
Ok(validator.effective_balance)
Ok(validator.effective_balance())
} else {
Ok(0)
}