From af7cb37b58f73d5623ab2b65e3629e2409d48e03 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Thu, 30 Sep 2021 07:35:09 +0100 Subject: [PATCH] Fix return data too large test (cherry picked from commit d09687c30e7207b80d105eba30cf6008ebe29088) --- programs/bpf/rust/invoke/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/bpf/rust/invoke/src/lib.rs b/programs/bpf/rust/invoke/src/lib.rs index 31171c7b0316f3..d5c4aa0d9ec862 100644 --- a/programs/bpf/rust/invoke/src/lib.rs +++ b/programs/bpf/rust/invoke/src/lib.rs @@ -33,6 +33,7 @@ const TEST_WRITABLE_DEESCALATION_WRITABLE: u8 = 14; const TEST_NESTED_INVOKE_TOO_DEEP: u8 = 15; const TEST_EXECUTABLE_LAMPORTS: u8 = 16; const ADD_LAMPORTS: u8 = 17; +const TEST_RETURN_DATA_TOO_LARGE: u8 = 19; // const MINT_INDEX: usize = 0; // unused placeholder const ARGUMENT_INDEX: usize = 1; @@ -667,6 +668,9 @@ fn process_instruction( // make sure the total balance is fine **accounts[0].lamports.borrow_mut() += 1; } + TEST_RETURN_DATA_TOO_LARGE => { + set_return_data(&[1u8; 1028]); + } _ => panic!(), }