mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 06:18:31 +00:00
@@ -1021,7 +1021,7 @@ mod test {
|
||||
|
||||
mod collect_valid_votes {
|
||||
use super::*;
|
||||
use types::VList;
|
||||
use types::List;
|
||||
|
||||
fn get_eth1_data_vec(n: u64, block_number_offset: u64) -> Vec<(Eth1Data, BlockNumber)> {
|
||||
(0..n)
|
||||
@@ -1069,7 +1069,7 @@ mod test {
|
||||
|
||||
let votes_to_consider = get_eth1_data_vec(slots, 0);
|
||||
|
||||
*state.eth1_data_votes_mut() = VList::new(
|
||||
*state.eth1_data_votes_mut() = List::new(
|
||||
votes_to_consider[0..slots as usize / 4]
|
||||
.iter()
|
||||
.map(|(eth1_data, _)| eth1_data)
|
||||
@@ -1100,7 +1100,7 @@ mod test {
|
||||
.expect("should have some eth1 data")
|
||||
.clone();
|
||||
|
||||
*state.eth1_data_votes_mut() = VList::new(
|
||||
*state.eth1_data_votes_mut() = List::new(
|
||||
vec![duplicate_eth1_data.clone(); 4]
|
||||
.iter()
|
||||
.map(|(eth1_data, _)| eth1_data)
|
||||
|
||||
@@ -6,7 +6,7 @@ use ssz::{Decode, Encode};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use std::io::{Read, Write};
|
||||
use std::str::FromStr;
|
||||
use types::{BeaconState, ChainSpec, EthSpec, Slot, VList};
|
||||
use types::{BeaconState, ChainSpec, EthSpec, List, Slot};
|
||||
use zstd::{Decoder, Encoder};
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -91,7 +91,7 @@ impl HDiffBuffer {
|
||||
|
||||
pub fn into_state<E: EthSpec>(self, spec: &ChainSpec) -> Result<BeaconState<E>, Error> {
|
||||
let mut state = BeaconState::from_ssz_bytes(&self.state, spec).unwrap();
|
||||
*state.balances_mut() = VList::new(self.balances).unwrap();
|
||||
*state.balances_mut() = List::new(self.balances).unwrap();
|
||||
Ok(state)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user