Satisfy Clippy, remove non-tree-states code

This commit is contained in:
Michael Sproul
2022-03-28 11:42:55 +11:00
parent 705cba6443
commit c5212d0f98
45 changed files with 129 additions and 1153 deletions

View File

@@ -53,11 +53,14 @@ pub fn run<T: EthSpec>(testnet_dir: PathBuf, matches: &ArgMatches) -> Result<(),
eprintln!("{}: {}", index, keypair.pk);
validators.get_mut(index).unwrap().pubkey = keypair.pk.into();
validators
.get_mut(index)
.unwrap()
.replace_pubkey(keypair.pk.into());
// Update the deposit tree.
let mut deposit_data = DepositData {
pubkey: validators.get(index).unwrap().pubkey,
pubkey: *validators.get(index).unwrap().pubkey(),
// Set this to a junk value since it's very time consuming to generate the withdrawal
// keys and it's not useful for the time being.
withdrawal_credentials: Hash256::zero(),
@@ -70,7 +73,6 @@ pub fn run<T: EthSpec>(testnet_dir: PathBuf, matches: &ArgMatches) -> Result<(),
.map_err(|e| format!("failed to create deposit tree: {:?}", e))?;
deposit_root = deposit_tree.root();
}
drop(validators);
// Update the genesis validators root since we changed the validators.
*state.genesis_validators_root_mut() = state.validators().tree_hash_root();