Skip to content

Commit

Permalink
added in no_entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
coachchucksol committed Oct 31, 2024
1 parent 928b9f7 commit 0936626
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ jito-account-traits-derive = { git = "https://github.com/jito-foundation/restaki
jito-jsm-core = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-restaking-client = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-restaking-core = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-restaking-program = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-restaking-program = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3", features = ["no-entrypoint"] }
jito-restaking-sdk = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-vault-client = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-vault-core = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-vault-program = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
jito-vault-program = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3", features = ["no-entrypoint"] }
jito-vault-sdk = { git = "https://github.com/jito-foundation/restaking.git", version = "=0.0.3" }
8 changes: 4 additions & 4 deletions program/src/finalize_weight_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ pub fn process_finalize_weight_table(
load_signer(weight_table_admin, true)?;
WeightTable::load(program_id, weight_table, ncn, ncn_epoch, true)?;

// if restaking_program_id.key.ne(&jito_restaking_program()) {
// msg!("Incorrect restaking program ID");
// return Err(ProgramError::InvalidAccountData);
// }
if restaking_program_id.key.ne(&jito_restaking_program::id()) {
msg!("Incorrect restaking program ID");
return Err(ProgramError::InvalidAccountData);
}

if ncn_weight_table_admin.ne(weight_table_admin.key) {
msg!("Vault update delegations ticket is not at the correct PDA");
Expand Down
8 changes: 4 additions & 4 deletions program/src/initialize_weight_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ pub fn process_initialize_weight_table(
load_signer(weight_table_admin, true)?;
load_system_program(system_program)?;

// if restaking_program_id.key.ne(&jito_restaking_program::id()) {
// msg!("Incorrect restaking program ID");
// return Err(ProgramError::InvalidAccountData);
// }
if restaking_program_id.key.ne(&jito_restaking_program::id()) {
msg!("Incorrect restaking program ID");
return Err(ProgramError::InvalidAccountData);
}

if ncn_weight_table_admin.ne(weight_table_admin.key) {
msg!("Vault update delegations ticket is not at the correct PDA");
Expand Down
8 changes: 4 additions & 4 deletions program/src/update_weight_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ pub fn process_update_weight_table(
load_token_mint(mint)?;
WeightTable::load(program_id, weight_table, ncn, ncn_epoch, true)?;

// if restaking_program_id.key.ne(&jito_restaking_program::id()) {
// msg!("Incorrect restaking program ID");
// return Err(ProgramError::InvalidAccountData);
// }
if restaking_program_id.key.ne(&jito_restaking_program::id()) {
msg!("Incorrect restaking program ID");
return Err(ProgramError::InvalidAccountData);
}

if ncn_weight_table_admin.ne(weight_table_admin.key) {
msg!("Vault update delegations ticket is not at the correct PDA");
Expand Down

0 comments on commit 0936626

Please sign in to comment.