Remove milhouse export aliases (#5286)

Closes #5141
This commit is contained in:
Lion - dapplion
2024-02-27 09:19:22 +08:00
committed by GitHub
parent a5d3408c59
commit 5dfc5c1f88
22 changed files with 83 additions and 94 deletions

View File

@@ -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)

View File

@@ -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)
}
}