Remove instruction name logs since they would be redundant with next anchor release

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2021-12-07 19:12:56 +01:00
parent 2f5e133648
commit 317b7168eb
14 changed files with 0 additions and 16 deletions

View File

@ -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<Clawback>, deposit_entry_index: u8) -> Result<()> {
msg!("--------clawback--------");
// Load the accounts.
let registrar = &ctx.accounts.registrar;
let voter = &mut ctx.accounts.voter.load_mut()?;

View File

@ -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<CloseDepositEntry>, 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);

View File

@ -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<CloseVoter>) -> 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()

View File

@ -50,7 +50,6 @@ pub fn configure_voting_mint(
decimals: u8,
grant_authority: Option<Pubkey>,
) -> Result<()> {
msg!("--------configure_voting_mint--------");
require!(rate > 0, InvalidRate);
let registrar = &mut ctx.accounts.registrar;
require!(

View File

@ -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()?;

View File

@ -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();

View File

@ -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.

View File

@ -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>, deposit_entry_index: u8, amount: u64) -> Result<()> {
msg!("--------update_deposit--------");
if amount == 0 {
return Ok(());
}

View File

@ -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();

View File

@ -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)?;

View File

@ -13,7 +13,6 @@ pub struct SetTimeOffset<'info> {
/// A debug-only instruction that advances the time.
pub fn set_time_offset(ctx: Context<SetTimeOffset>, time_offset: i64) -> Result<()> {
msg!("--------set_time_offset--------");
let allowed_program = Pubkey::from_str("GovernanceProgram11111111111111111111111111").unwrap();
let registrar = &mut ctx.accounts.registrar;
require!(

View File

@ -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<UpdateMaxVoteWeight>) -> Result<()> {
msg!("--------update_max_vote_weight--------");
let registrar = &ctx.accounts.registrar;
let _max_vote_weight = {
let total: Result<u64> = ctx

View File

@ -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<UpdateVoterWeightRecord>) -> 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;

View File

@ -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<Withdraw>, 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()?;