From 8730cf64deced5ed47556758e77011be5f3178fb Mon Sep 17 00:00:00 2001 From: Erwan Or Date: Wed, 1 May 2024 20:14:33 -0400 Subject: [PATCH] planner: things are looking up.jpg --- crates/view/src/planner.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/view/src/planner.rs b/crates/view/src/planner.rs index 123ce85819..dcf57f50ad 100644 --- a/crates/view/src/planner.rs +++ b/crates/view/src/planner.rs @@ -10,7 +10,7 @@ use rand::{CryptoRng, RngCore}; use rand_core::OsRng; use tracing::instrument; -use penumbra_asset::{asset, Balance, Value, STAKING_TOKEN_ASSET_ID}; +use penumbra_asset::{asset, Balance, Value}; // use penumbra_auction::auction::dutch::actions::ActionDutchAuctionWithdrawPlan; // use penumbra_auction::auction::dutch::DutchAuctionDescription; // use penumbra_auction::auction::{ @@ -39,7 +39,7 @@ use penumbra_ibc::IbcRelay; use penumbra_keys::{keys::AddressIndex, Address}; use penumbra_num::Amount; use penumbra_proto::view::v1::{NotesForVotingRequest, NotesRequest}; -use penumbra_shielded_pool::{fmd, Ics20Withdrawal, Note, OutputPlan, SpendPlan}; +use penumbra_shielded_pool::{Ics20Withdrawal, Note, OutputPlan, SpendPlan}; use penumbra_stake::{rate::RateData, validator, IdentityKey, UndelegateClaimPlan}; use penumbra_tct as tct; use penumbra_transaction::{ @@ -69,9 +69,9 @@ pub struct Planner { #[derive(Debug, Clone)] struct VoteIntent { start_block_height: u64, - start_position: tct::Position, - rate_data: BTreeMap, - vote: Vote, + // start_position: tct::Position, + // rate_data: BTreeMap, + // vote: Vote, } impl Debug for Planner { @@ -110,7 +110,7 @@ impl Planner { balance } - fn push(&mut self, action: ActionPlan) { + fn _push(&mut self, action: ActionPlan) { self.actions.push(action); } @@ -528,22 +528,22 @@ impl Planner { /// Vote with all possible vote weight on a given proposal. /// /// Voting twice on the same proposal in the same planner will overwrite the previous vote. - #[instrument(skip(self, start_position, start_rate_data))] + #[instrument(skip(self, _start_position, _start_rate_data))] pub fn delegator_vote( &mut self, proposal: u64, start_block_height: u64, - start_position: tct::Position, - start_rate_data: BTreeMap, + _start_position: tct::Position, + _start_rate_data: BTreeMap, vote: Vote, ) -> &mut Self { self.vote_intents.insert( proposal, VoteIntent { - start_position, + // start_position, start_block_height, - vote, - rate_data: start_rate_data, + // vote, + // rate_data: start_rate_data, }, ); self