From 317b7168eb1aebabf11e48c106b5e39da36397fa Mon Sep 17 00:00:00 2001 From: microwavedcola1 Date: Tue, 7 Dec 2021 19:12:56 +0100 Subject: [PATCH] Remove instruction name logs since they would be redundant with next anchor release Signed-off-by: microwavedcola1 --- programs/voter-stake-registry/src/instructions/clawback.rs | 1 - .../src/instructions/close_deposit_entry.rs | 1 - programs/voter-stake-registry/src/instructions/close_voter.rs | 1 - .../src/instructions/configure_voting_mint.rs | 1 - .../src/instructions/create_deposit_entry.rs | 1 - .../voter-stake-registry/src/instructions/create_registrar.rs | 1 - programs/voter-stake-registry/src/instructions/create_voter.rs | 1 - programs/voter-stake-registry/src/instructions/deposit.rs | 1 - programs/voter-stake-registry/src/instructions/grant.rs | 2 -- programs/voter-stake-registry/src/instructions/reset_lockup.rs | 1 - .../voter-stake-registry/src/instructions/set_time_offset.rs | 1 - .../src/instructions/update_max_vote_weight.rs | 1 - .../src/instructions/update_voter_weight_record.rs | 1 - programs/voter-stake-registry/src/instructions/withdraw.rs | 2 -- 14 files changed, 16 deletions(-) diff --git a/programs/voter-stake-registry/src/instructions/clawback.rs b/programs/voter-stake-registry/src/instructions/clawback.rs index b6f884c..3b8ef29 100644 --- a/programs/voter-stake-registry/src/instructions/clawback.rs +++ b/programs/voter-stake-registry/src/instructions/clawback.rs @@ -64,7 +64,6 @@ impl<'info> Clawback<'info> { /// The instruction will always reclaim all locked tokens, while leaving tokens /// that have already vested in place. pub fn clawback(ctx: Context, deposit_entry_index: u8) -> Result<()> { - msg!("--------clawback--------"); // Load the accounts. let registrar = &ctx.accounts.registrar; let voter = &mut ctx.accounts.voter.load_mut()?; diff --git a/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs b/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs index 40eb89b..374e81e 100644 --- a/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs +++ b/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs @@ -22,7 +22,6 @@ pub struct CloseDepositEntry<'info> { /// If the deposit entry has `allow_clawback` set, it can only be closed once /// the lockup period has expired. pub fn close_deposit_entry(ctx: Context, deposit_entry_index: u8) -> Result<()> { - msg!("--------close_deposit_entry--------"); let voter = &mut ctx.accounts.voter.load_mut()?; let d = voter.active_deposit_mut(deposit_entry_index)?; require!(d.amount_deposited_native == 0, VotingTokenNonZero); diff --git a/programs/voter-stake-registry/src/instructions/close_voter.rs b/programs/voter-stake-registry/src/instructions/close_voter.rs index 71047d1..3552691 100644 --- a/programs/voter-stake-registry/src/instructions/close_voter.rs +++ b/programs/voter-stake-registry/src/instructions/close_voter.rs @@ -20,7 +20,6 @@ pub struct CloseVoter<'info> { /// Closes the voter account, allowing one to retrieve rent exemption SOL. /// Only accounts with no remaining deposits can be closed. pub fn close_voter(ctx: Context) -> Result<()> { - msg!("--------close_voter--------"); let voter = &ctx.accounts.voter.load()?; let amount = voter.deposits.iter().fold(0u64, |sum, d| { sum.checked_add(d.amount_deposited_native).unwrap() diff --git a/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs b/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs index 233ca79..335a233 100644 --- a/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs +++ b/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs @@ -50,7 +50,6 @@ pub fn configure_voting_mint( decimals: u8, grant_authority: Option, ) -> Result<()> { - msg!("--------configure_voting_mint--------"); require!(rate > 0, InvalidRate); let registrar = &mut ctx.accounts.registrar; require!( diff --git a/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs b/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs index 7175e01..83b057a 100644 --- a/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs +++ b/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs @@ -38,7 +38,6 @@ pub fn create_deposit_entry( periods: u32, allow_clawback: bool, ) -> Result<()> { - msg!("--------create_deposit_entry--------"); // Load accounts. let registrar = &ctx.accounts.registrar; let voter = &mut ctx.accounts.voter.load_mut()?; diff --git a/programs/voter-stake-registry/src/instructions/create_registrar.rs b/programs/voter-stake-registry/src/instructions/create_registrar.rs index 4f0884b..29ea283 100644 --- a/programs/voter-stake-registry/src/instructions/create_registrar.rs +++ b/programs/voter-stake-registry/src/instructions/create_registrar.rs @@ -56,7 +56,6 @@ pub fn create_registrar( vote_weight_decimals: u8, registrar_bump: u8, ) -> Result<()> { - msg!("--------create_registrar--------"); let registrar = &mut ctx.accounts.registrar; registrar.bump = registrar_bump; registrar.governance_program_id = ctx.accounts.governance_program_id.key(); diff --git a/programs/voter-stake-registry/src/instructions/create_voter.rs b/programs/voter-stake-registry/src/instructions/create_voter.rs index 4a8f813..427bc60 100644 --- a/programs/voter-stake-registry/src/instructions/create_voter.rs +++ b/programs/voter-stake-registry/src/instructions/create_voter.rs @@ -64,7 +64,6 @@ pub fn create_voter( voter_bump: u8, voter_weight_record_bump: u8, ) -> Result<()> { - msg!("--------create_voter--------"); // Forbid creating voter accounts from CPI. The goal is to make automation // impossible that weakens some of the limitations intentionally imposed on // locked tokens. diff --git a/programs/voter-stake-registry/src/instructions/deposit.rs b/programs/voter-stake-registry/src/instructions/deposit.rs index ad54f7d..d12024b 100644 --- a/programs/voter-stake-registry/src/instructions/deposit.rs +++ b/programs/voter-stake-registry/src/instructions/deposit.rs @@ -55,7 +55,6 @@ impl<'info> Deposit<'info> { /// `deposit_entry_index`: Index of the deposit entry. /// `amount`: Number of native tokens to transfer. pub fn deposit(ctx: Context, deposit_entry_index: u8, amount: u64) -> Result<()> { - msg!("--------update_deposit--------"); if amount == 0 { return Ok(()); } diff --git a/programs/voter-stake-registry/src/instructions/grant.rs b/programs/voter-stake-registry/src/instructions/grant.rs index 36e598f..9089644 100644 --- a/programs/voter-stake-registry/src/instructions/grant.rs +++ b/programs/voter-stake-registry/src/instructions/grant.rs @@ -88,8 +88,6 @@ pub fn grant( allow_clawback: bool, amount: u64, ) -> Result<()> { - msg!("--------grant--------"); - // Load accounts. let registrar = &ctx.accounts.registrar; let voter_authority = ctx.accounts.voter_authority.key(); diff --git a/programs/voter-stake-registry/src/instructions/reset_lockup.rs b/programs/voter-stake-registry/src/instructions/reset_lockup.rs index 859830b..af2f364 100644 --- a/programs/voter-stake-registry/src/instructions/reset_lockup.rs +++ b/programs/voter-stake-registry/src/instructions/reset_lockup.rs @@ -25,7 +25,6 @@ pub fn reset_lockup( deposit_entry_index: u8, periods: u32, ) -> Result<()> { - msg!("--------reset_lockup--------"); let registrar = &ctx.accounts.registrar; let voter = &mut ctx.accounts.voter.load_mut()?; let d = voter.active_deposit_mut(deposit_entry_index)?; diff --git a/programs/voter-stake-registry/src/instructions/set_time_offset.rs b/programs/voter-stake-registry/src/instructions/set_time_offset.rs index 49b3dcf..951f9fd 100644 --- a/programs/voter-stake-registry/src/instructions/set_time_offset.rs +++ b/programs/voter-stake-registry/src/instructions/set_time_offset.rs @@ -13,7 +13,6 @@ pub struct SetTimeOffset<'info> { /// A debug-only instruction that advances the time. pub fn set_time_offset(ctx: Context, time_offset: i64) -> Result<()> { - msg!("--------set_time_offset--------"); let allowed_program = Pubkey::from_str("GovernanceProgram11111111111111111111111111").unwrap(); let registrar = &mut ctx.accounts.registrar; require!( diff --git a/programs/voter-stake-registry/src/instructions/update_max_vote_weight.rs b/programs/voter-stake-registry/src/instructions/update_max_vote_weight.rs index ed382ad..1a94858 100644 --- a/programs/voter-stake-registry/src/instructions/update_max_vote_weight.rs +++ b/programs/voter-stake-registry/src/instructions/update_max_vote_weight.rs @@ -20,7 +20,6 @@ pub struct UpdateMaxVoteWeight<'info> { /// all tokens fits into a u64 *after* converting into common decimals, as /// defined by the registrar's `rate_decimal` field. pub fn update_max_vote_weight<'info>(ctx: Context) -> Result<()> { - msg!("--------update_max_vote_weight--------"); let registrar = &ctx.accounts.registrar; let _max_vote_weight = { let total: Result = ctx diff --git a/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs b/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs index 22b5a37..fd060c4 100644 --- a/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs +++ b/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs @@ -34,7 +34,6 @@ pub struct UpdateVoterWeightRecord<'info> { /// This "revise" instruction must be called immediately before voting, in /// the same transaction. pub fn update_voter_weight_record(ctx: Context) -> Result<()> { - msg!("--------update_voter_weight_record--------"); let registrar = &ctx.accounts.registrar; let voter = ctx.accounts.voter.load()?; let record = &mut ctx.accounts.voter_weight_record; diff --git a/programs/voter-stake-registry/src/instructions/withdraw.rs b/programs/voter-stake-registry/src/instructions/withdraw.rs index bea5754..53658b6 100644 --- a/programs/voter-stake-registry/src/instructions/withdraw.rs +++ b/programs/voter-stake-registry/src/instructions/withdraw.rs @@ -73,8 +73,6 @@ impl<'info> Withdraw<'info> { /// `deposit_entry_index`: The deposit entry to withdraw from. /// `amount` is in units of the native currency being withdrawn. pub fn withdraw(ctx: Context, deposit_entry_index: u8, amount: u64) -> Result<()> { - msg!("--------withdraw--------"); - // Load the accounts. let registrar = &ctx.accounts.registrar; let voter = &mut ctx.accounts.voter.load_mut()?;