From 57cb26d580f5c2af88c0036afe99167d7ae16702 Mon Sep 17 00:00:00 2001 From: Nick Garfield Date: Wed, 12 Oct 2022 13:46:38 -0500 Subject: [PATCH] Reset the return data to an empty byte array at checkpoint B. --- programs/queue/src/instructions/queue_crank.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/programs/queue/src/instructions/queue_crank.rs b/programs/queue/src/instructions/queue_crank.rs index 89fb5df41..76386f62e 100644 --- a/programs/queue/src/instructions/queue_crank.rs +++ b/programs/queue/src/instructions/queue_crank.rs @@ -1,3 +1,5 @@ +use anchor_lang::solana_program::program::set_return_data; + use { crate::{errors::*, objects::*}, anchor_lang::prelude::*, @@ -222,7 +224,11 @@ pub fn handler(ctx: Context, data_hash: Option) -> 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)