Skip to content

Commit

Permalink
feat: remove unnecessary init space in structs
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Maldonado <[email protected]>
  • Loading branch information
md0x committed Jan 7, 2025
1 parent ace1d34 commit 0e942f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions programs/svm-spoke/src/common/v3_relay_data.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anchor_lang::prelude::*;

#[derive(AnchorSerialize, AnchorDeserialize, Clone, InitSpace)]
#[derive(AnchorSerialize, AnchorDeserialize, Clone)]
pub struct V3RelayData {
pub depositor: Pubkey,
pub recipient: Pubkey,
Expand All @@ -13,6 +13,5 @@ pub struct V3RelayData {
pub deposit_id: [u8; 32],
pub fill_deadline: u32,
pub exclusivity_deadline: u32,
#[max_len(0)]
pub message: Vec<u8>,
}
4 changes: 1 addition & 3 deletions programs/svm-spoke/src/instructions/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ pub struct ExecuteRelayerRefundLeaf<'info> {
pub system_program: Program<'info, System>,
}

#[derive(AnchorSerialize, AnchorDeserialize, Clone, InitSpace)]
#[derive(AnchorSerialize, AnchorDeserialize, Clone)]
pub struct RelayerRefundLeaf {
pub amount_to_return: u64,
pub chain_id: u64,
#[max_len(0)]
pub refund_amounts: Vec<u64>,
pub leaf_id: u32,
pub mint_public_key: Pubkey,
#[max_len(0)]
pub refund_addresses: Vec<Pubkey>,
}

Expand Down
2 changes: 1 addition & 1 deletion programs/svm-spoke/src/instructions/slow_fill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn unwrap_request_v3_slow_fill_params(
}
}

#[derive(AnchorSerialize, AnchorDeserialize, Clone, InitSpace)]
#[derive(AnchorSerialize, AnchorDeserialize, Clone)]
pub struct V3SlowFill {
pub relay_data: V3RelayData,
pub chain_id: u64,
Expand Down

0 comments on commit 0e942f7

Please sign in to comment.