mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-02 20:34:27 +00:00
fix build by patching up import and usage
This commit is contained in:
@@ -3,7 +3,6 @@ extern crate bytes;
|
|||||||
extern crate hashing;
|
extern crate hashing;
|
||||||
extern crate types;
|
extern crate types;
|
||||||
|
|
||||||
use active_validators::validator_is_active;
|
|
||||||
use bytes::{BufMut, BytesMut};
|
use bytes::{BufMut, BytesMut};
|
||||||
use hashing::canonical_hash;
|
use hashing::canonical_hash;
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
@@ -31,7 +30,7 @@ pub fn update_validator_set(
|
|||||||
let total_balance = {
|
let total_balance = {
|
||||||
let mut bal: u64 = 0;
|
let mut bal: u64 = 0;
|
||||||
for v in validators.iter() {
|
for v in validators.iter() {
|
||||||
if validator_is_active(&v) {
|
if v.status_is(ValidatorStatus::Active) {
|
||||||
bal = bal
|
bal = bal
|
||||||
.checked_add(v.balance)
|
.checked_add(v.balance)
|
||||||
.ok_or(UpdateValidatorSetError::ArithmeticOverflow)?;
|
.ok_or(UpdateValidatorSetError::ArithmeticOverflow)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user