Skip to content

Commit

Permalink
Reset the return data to an empty byte array at checkpoint B.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Garfield committed Oct 12, 2022
1 parent 1e95450 commit 57cb26d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion programs/queue/src/instructions/queue_crank.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use anchor_lang::solana_program::program::set_return_data;

use {
crate::{errors::*, objects::*},
anchor_lang::prelude::*,
Expand Down Expand Up @@ -222,7 +224,11 @@ pub fn handler(ctx: Context<QueueCrank>, data_hash: Option<u64>) -> Result<()> {
let bump = ctx.bumps.get("queue").unwrap();
queue.crank(ctx.remaining_accounts, *bump, signatory)?;

msg!("B");
msg!("B1");

set_return_data(&[]);

msg!("B2");

// set_return_data(data)

Expand Down

0 comments on commit 57cb26d

Please sign in to comment.