Skip to content

Commit 5c7e2e5

Browse files
committed
cleanup
1 parent 773def4 commit 5c7e2e5

File tree

6 files changed

+11
-27
lines changed

6 files changed

+11
-27
lines changed

program-libs/account-checks/src/packed_accounts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ impl<A: AccountInfoTrait> ProgramPackedAccounts<'_, A> {
1313
#[track_caller]
1414
#[inline(always)]
1515
pub fn get(&self, index: usize, name: &str) -> Result<&A, AccountError> {
16-
let location = Location::caller();
1716
if index >= self.accounts.len() {
17+
let location = Location::caller();
1818
solana_msg::msg!(
1919
"ERROR: Not enough accounts. Requested '{}' at index {} but only {} accounts available. {}:{}:{}",
2020
name, index, self.accounts.len(), location.file(), location.line(), location.column()
@@ -24,7 +24,6 @@ impl<A: AccountInfoTrait> ProgramPackedAccounts<'_, A> {
2424
Ok(&self.accounts[index])
2525
}
2626

27-
// TODO: add get_checked_account from PackedAccounts.
2827
/// Get account by u8 index with bounds checking
2928
#[track_caller]
3029
#[inline(always)]

program-tests/compressed-token-test/tests/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3214,7 +3214,7 @@ async fn failing_tests_burn() {
32143214
None,
32153215
)
32163216
.await;
3217-
println!("instruction {:?}", instruction);
3217+
32183218
let res = rpc
32193219
.create_and_send_transaction(&[instruction], &sender.pubkey(), &[&payer, &sender])
32203220
.await;

program-tests/system-cpi-test/tests/test.rs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//#![cfg(feature = "test-sbf")]
1+
#![cfg(feature = "test-sbf")]
22

33
use account_compression::errors::AccountCompressionErrorCode;
44
use anchor_lang::{AnchorDeserialize, AnchorSerialize};
@@ -1258,15 +1258,7 @@ async fn test_approve_revoke_burn_freeze_thaw_with_cpi_context() {
12581258
)
12591259
.await
12601260
.unwrap();
1261-
println!(
1262-
"approve accounts: {:?}",
1263-
test_indexer
1264-
.get_compressed_token_accounts_by_owner(&payer.pubkey(), None, None)
1265-
.await
1266-
.unwrap()
1267-
.value
1268-
.items
1269-
);
1261+
12701262
let compressed_token_data = test_indexer
12711263
.get_compressed_token_accounts_by_owner(&payer.pubkey(), None, None)
12721264
.await
@@ -1296,7 +1288,7 @@ async fn test_approve_revoke_burn_freeze_thaw_with_cpi_context() {
12961288
.filter(|x| x.token.delegate.is_some())
12971289
.collect::<Vec<_>>()[0]
12981290
.clone();
1299-
println!("compressed_token_data {:?}", compressed_token_data);
1291+
13001292
perform_with_input_accounts(
13011293
&mut test_indexer,
13021294
&mut rpc,
@@ -1309,15 +1301,7 @@ async fn test_approve_revoke_burn_freeze_thaw_with_cpi_context() {
13091301
)
13101302
.await
13111303
.unwrap();
1312-
println!(
1313-
"revoke accounts {:?}",
1314-
test_indexer
1315-
.get_compressed_token_accounts_by_owner(&payer.pubkey(), None, None)
1316-
.await
1317-
.unwrap()
1318-
.value
1319-
.items
1320-
);
1304+
13211305
let compressed_token_data = test_indexer
13221306
.get_compressed_token_accounts_by_owner(&payer.pubkey(), None, None)
13231307
.await

program-tests/system-cpi-v2-test/tests/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//#![cfg(feature = "test-sbf")]
1+
#![cfg(feature = "test-sbf")]
22

33
use std::collections::HashMap;
44

program-tests/system-cpi-v2-test/tests/invoke_cpi_with_read_only.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// #![cfg(feature = "test-sbf")]
1+
#![cfg(feature = "test-sbf")]
22

33
mod event;
44

@@ -2294,7 +2294,7 @@ async fn cpi_context_with_read_only() {
22942294
output_account_balance[0].compressed_account.address,
22952295
Some(address)
22962296
);
2297-
println!("{:?}", address1);
2297+
22982298
let account = test_indexer
22992299
.get_compressed_account(address1, None)
23002300
.await
@@ -3167,7 +3167,7 @@ pub mod local_sdk {
31673167
remaining_accounts,
31683168
write_into_cpi_context,
31693169
);
3170-
println!("instruction {:?}", instruction);
3170+
31713171
let res = rpc
31723172
.create_and_send_transaction_with_batched_event(
31733173
&[instruction],

scripts/devenv.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export CARGO_HOME
8787
export NPM_CONFIG_PREFIX
8888
export LIGHT_PROTOCOL_TOPLEVEL
8989
export LIGHT_PROTOCOL_DEVENV
90+
export SBF_OUT_DIR=target/deploy
9091

9192
# Set Redis URL if not already set
9293
export REDIS_URL="${REDIS_URL:-redis://localhost:6379}"

0 commit comments

Comments
 (0)