Skip to content

Commit

Permalink
fix: remove duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
aoikurokawa committed Dec 3, 2024
1 parent 4f4db15 commit ad94438
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions core/src/ballot_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use spl_math::precise_number::PreciseNumber;

use crate::{constants::PRECISE_CONSENSUS, discriminators::Discriminators, error::TipRouterError};

#[derive(Debug, Clone, PartialEq, Eq, Copy, Zeroable, ShankType, Pod, ShankType)]
#[derive(Debug, Clone, PartialEq, Eq, Copy, Zeroable, Pod, ShankType)]
#[repr(C)]
pub struct Ballot {
merkle_root: [u8; 32],
Expand Down Expand Up @@ -42,7 +42,7 @@ impl Ballot {
}
}

#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, ShankType)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, ShankType)]
#[repr(C)]
pub struct BallotTally {
ballot: Ballot,
Expand Down Expand Up @@ -104,7 +104,7 @@ impl BallotTally {
}
}

#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, ShankType)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, ShankType)]
#[repr(C)]
pub struct OperatorVote {
operator: Pubkey,
Expand Down Expand Up @@ -164,7 +164,7 @@ impl OperatorVote {
}

// PDA'd ["epoch_snapshot", NCN, NCN_EPOCH_SLOT]
#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, AccountDeserialize, ShankAccount)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, AccountDeserialize, ShankAccount)]
#[repr(C)]
pub struct BallotBox {
ncn: Pubkey,
Expand Down
6 changes: 3 additions & 3 deletions core/src/epoch_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::{
};

// PDA'd ["epoch_snapshot", NCN, NCN_EPOCH_SLOT]
#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, AccountDeserialize, ShankAccount)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, AccountDeserialize, ShankAccount)]
#[repr(C)]
pub struct EpochSnapshot {
/// The NCN on-chain program is the signer to create and update this account,
Expand Down Expand Up @@ -192,7 +192,7 @@ impl EpochSnapshot {
}

// PDA'd ["operator_snapshot", OPERATOR, NCN, NCN_EPOCH_SLOT]
#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, AccountDeserialize, ShankAccount)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, AccountDeserialize, ShankAccount)]
#[repr(C)]
pub struct OperatorSnapshot {
operator: Pubkey,
Expand Down Expand Up @@ -220,7 +220,7 @@ pub struct OperatorSnapshot {
vault_operator_stake_weight: [VaultOperatorStakeWeight; 32],
}

#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, ShankType)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, ShankType)]
#[repr(C)]
pub struct VaultOperatorStakeWeight {
vault: Pubkey,
Expand Down
4 changes: 2 additions & 2 deletions core/src/ncn_config.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use bytemuck::{Pod, Zeroable};
use jito_bytemuck::{AccountDeserialize, Discriminator};
use shank::{ShankAccount, ShankType};
use shank::ShankAccount;
use solana_program::{account_info::AccountInfo, msg, program_error::ProgramError, pubkey::Pubkey};

use crate::{discriminators::Discriminators, fees::Fees};

#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, AccountDeserialize, ShankAccount)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, AccountDeserialize, ShankAccount)]
#[repr(C)]
pub struct NcnConfig {
/// The Restaking program's NCN admin is the signer to create and update this account
Expand Down
4 changes: 2 additions & 2 deletions core/src/weight_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use std::collections::HashSet;

use bytemuck::{Pod, Zeroable};
use jito_bytemuck::{types::PodU64, AccountDeserialize, Discriminator};
use shank::{ShankAccount, ShankType};
use shank::ShankAccount;
use solana_program::{account_info::AccountInfo, msg, program_error::ProgramError, pubkey::Pubkey};
use spl_math::precise_number::PreciseNumber;

use crate::{discriminators::Discriminators, error::TipRouterError, weight_entry::WeightEntry};

// PDA'd ["WEIGHT_TABLE", NCN, NCN_EPOCH_SLOT]
#[derive(Debug, Clone, Copy, Zeroable, ShankType, Pod, AccountDeserialize, ShankAccount)]
#[derive(Debug, Clone, Copy, Zeroable, Pod, AccountDeserialize, ShankAccount)]
#[repr(C)]
pub struct WeightTable {
/// The NCN on-chain program is the signer to create and update this account,
Expand Down

0 comments on commit ad94438

Please sign in to comment.