Skip to content

Commit

Permalink
planner: things are looking up.jpg
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed May 2, 2024
1 parent 479b85c commit 8730cf6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions crates/view/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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::{
Expand Down Expand Up @@ -69,9 +69,9 @@ pub struct Planner<R: RngCore + CryptoRng> {
#[derive(Debug, Clone)]
struct VoteIntent {
start_block_height: u64,
start_position: tct::Position,
rate_data: BTreeMap<IdentityKey, RateData>,
vote: Vote,
// start_position: tct::Position,
// rate_data: BTreeMap<IdentityKey, RateData>,
// vote: Vote,
}

impl<R: RngCore + CryptoRng> Debug for Planner<R> {
Expand Down Expand Up @@ -110,7 +110,7 @@ impl<R: RngCore + CryptoRng> Planner<R> {
balance
}

fn push(&mut self, action: ActionPlan) {
fn _push(&mut self, action: ActionPlan) {
self.actions.push(action);
}

Expand Down Expand Up @@ -528,22 +528,22 @@ impl<R: RngCore + CryptoRng> Planner<R> {
/// 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<IdentityKey, RateData>,
_start_position: tct::Position,
_start_rate_data: BTreeMap<IdentityKey, RateData>,
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
Expand Down

0 comments on commit 8730cf6

Please sign in to comment.