Skip to content

Commit

Permalink
Add extra space in case we need to add fields (#250)
Browse files Browse the repository at this point in the history
* Add extra space in case we need to add fields

* Fix test
  • Loading branch information
guibescos authored Oct 24, 2023
1 parent 393e3af commit 981d874
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions staking/programs/staking/src/state/stake_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub struct StakeAccountMetadataV2 {
}

impl StakeAccountMetadataV2 {
pub const LEN: usize = 87;
pub const LEN: usize = 200;
}

#[cfg(test)]
Expand All @@ -36,10 +36,10 @@ pub mod tests {

#[test]
fn check_size() {
assert_eq!(
assert!(
anchor_lang::solana_program::borsh::get_packed_len::<StakeAccountMetadataV2>()
+ StakeAccountMetadataV2::discriminator().len(),
StakeAccountMetadataV2::LEN
+ StakeAccountMetadataV2::discriminator().len()
<= StakeAccountMetadataV2::LEN
);
}
}

1 comment on commit 981d874

@vercel
Copy link

@vercel vercel bot commented on 981d874 Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

staking-devnet – ./

staking-devnet-git-main-pyth-web.vercel.app
staking-devnet-pyth-web.vercel.app
governance-nu.vercel.app

Please sign in to comment.