Skip to content

Commit a6ebcd3

Browse files
committed
WORKED: cargo test --test 11_undelegate_before_restart restore_ledger_with_account_undelegated_before_restart --profile test -- --nocapture
1 parent 7990162 commit a6ebcd3

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

programs/magicblock/src/magicblock_processor.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use magicblock_magic_program_api::instruction::MagicBlockInstruction;
2+
use solana_log_collector::ic_msg;
23
use solana_program_runtime::declare_process_instruction;
34
use solana_sdk::program_utils::limited_deserialize;
45

@@ -27,6 +28,8 @@ declare_process_instruction!(
2728
let instruction = limited_deserialize(instruction_data)?;
2829
let signers = instruction_context.get_signers(transaction_context)?;
2930

31+
ic_msg!(invoke_context, "MagicBlockInstruction: {:?}", instruction);
32+
3033
match instruction {
3134
MagicBlockInstruction::ModifyAccounts(mut account_mods) => {
3235
process_mutate_accounts(

programs/magicblock/src/schedule_transactions/process_schedule_commit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ pub(crate) fn process_schedule_commit(
222222
let commit_sent_sig = action_sent_transaction.signatures[0];
223223

224224
let commit_action = if opts.request_diff {
225+
ic_msg!(invoke_context, "CommitType::StandaloneDiff");
225226
CommitType::StandaloneDiff(committed_accounts)
226227
} else {
227228
CommitType::Standalone(committed_accounts)

test-integration/programs/flexi-counter/src/processor.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,20 @@ pub fn process(
5252
accounts: &[AccountInfo],
5353
instruction_data: &[u8],
5454
) -> ProgramResult {
55+
msg!("process entered");
5556
if instruction_data.len() >= EXTERNAL_UNDELEGATE_DISCRIMINATOR.len() {
5657
let (disc, data) =
5758
instruction_data.split_at(EXTERNAL_UNDELEGATE_DISCRIMINATOR.len());
5859

60+
msg!("process entered alternative");
61+
5962
if disc == EXTERNAL_UNDELEGATE_DISCRIMINATOR {
63+
msg!("process EXTERNAL_UNDELEGATE_DISCRIMINATOR");
6064
return process_undelegate_request(accounts, data);
6165
}
6266

6367
if disc == EXTERNAL_CALL_HANDLER_DISCRIMINATOR {
68+
msg!("process EXTERNAL_CALL_HANDLER_DISCRIMINATOR");
6469
return process_call_handler(accounts, data);
6570
}
6671
}
@@ -336,13 +341,15 @@ fn process_add_and_schedule_commit(
336341

337342
// Request the PDA counter account to be committed
338343
if undelegate {
344+
msg!("invoke commit_and_undelegate_accounts");
339345
commit_and_undelegate_accounts(
340346
payer_info,
341347
vec![counter_pda_info],
342348
magic_context_info,
343349
magic_program_info,
344350
)?;
345351
} else {
352+
msg!("invoke commit_accounts");
346353
commit_accounts(
347354
payer_info,
348355
vec![counter_pda_info],

test-integration/test-runner/bin/run_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,6 @@ fn start_validator(
822822
ValidatorCluster::Chain(program_loader)
823823
if std::env::var("FORCE_MAGIC_BLOCK_VALIDATOR").is_err() =>
824824
{
825-
panic!("FORCE_MAGIC_BLOCK_VALIDATOR");
826-
827825
start_test_validator_with_config(
828826
&test_runner_paths,
829827
program_loader,

test-integration/test-tools/src/scheduled_commits.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ impl IntegrationTestContext {
192192
format!("ScheduledCommitSent signature not found in logs, {:#?}", logs)
193193
})?;
194194

195+
println!("LOGS: {:#?}", logs);
196+
195197
(logs, sig)
196198
};
197199

@@ -207,6 +209,7 @@ impl IntegrationTestContext {
207209
)
208210
})?;
209211

212+
println!("CHAIN_LOGS: {:#?}", chain_logs);
210213
println!("Found chain commit signatures");
211214

212215
let (included, excluded, feepayers, sigs) =

0 commit comments

Comments
 (0)