From 0d1735fc4378616bdef5e0bce22855e157337aa3 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Thu, 21 Mar 2024 16:43:26 -0400 Subject: [PATCH] =?UTF-8?q?chore(staking):=20=F0=9F=A7=B9=20tidy=20`valida?= =?UTF-8?q?tor=5Fmanager`=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../validator_handler/validator_manager.rs | 61 ++++++++----------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/crates/core/component/stake/src/component/validator_handler/validator_manager.rs b/crates/core/component/stake/src/component/validator_handler/validator_manager.rs index 1f2181d903..c548abfa22 100644 --- a/crates/core/component/stake/src/component/validator_handler/validator_manager.rs +++ b/crates/core/component/stake/src/component/validator_handler/validator_manager.rs @@ -1,40 +1,31 @@ -use std::collections::BTreeMap; - -use crate::{ - component::{ - metrics, stake::ConsensusIndexRead, stake::ConsensusIndexWrite, stake::RateDataWrite, - validator_handler::ValidatorDataWrite, +use { + super::{validator_store::ValidatorPoolTracker, ValidatorDataRead, ValidatorDataWrite}, + crate::{ + component::{ + metrics, + stake::{ConsensusIndexRead, ConsensusIndexWrite, RateDataWrite}, + StateReadExt as _, StateWriteExt as _, + }, + rate::{BaseRateData, RateData}, + state_key, + validator::{self, BondingState::*, State, State::*, Validator}, + DelegationToken, IdentityKey, Penalty, Uptime, }, - rate::{BaseRateData, RateData}, - validator::{State, Validator}, - DelegationToken, -}; -use anyhow::Result; -use async_trait::async_trait; -use futures::StreamExt as _; -use penumbra_num::Amount; -use penumbra_sct::component::clock::{EpochManager, EpochRead}; -use penumbra_shielded_pool::component::AssetRegistry; -use sha2::{Digest as _, Sha256}; -use tendermint::abci::types::{CommitInfo, Misbehavior}; -use tokio::task::JoinSet; -use validator::BondingState::*; -use validator::State::*; - -use cnidarium::StateWrite; -use penumbra_proto::StateWriteProto; -use tracing::{instrument, Instrument}; - -use crate::component::validator_handler::validator_store::ValidatorPoolTracker; -use crate::{ - component::validator_handler::ValidatorDataRead, - component::StateReadExt as _, - component::StateWriteExt as _, - state_key, - validator::{self}, - IdentityKey, Penalty, Uptime, + anyhow::Result, + async_trait::async_trait, + cnidarium::StateWrite, + futures::StreamExt as _, + penumbra_asset::asset, + penumbra_num::Amount, + penumbra_proto::StateWriteProto, + penumbra_sct::component::clock::{EpochManager, EpochRead}, + penumbra_shielded_pool::component::AssetRegistry, + sha2::{Digest as _, Sha256}, + std::collections::BTreeMap, + tendermint::abci::types::{CommitInfo, Misbehavior}, + tokio::task::JoinSet, + tracing::{instrument, Instrument}, }; -use penumbra_asset::asset; #[async_trait] /// Defines the validator state machine of the staking component.