Skip to content

Commit

Permalink
Fix return data too large test
Browse files Browse the repository at this point in the history
(cherry picked from commit d09687c)
  • Loading branch information
seanyoung committed Oct 12, 2021
1 parent 5ba06d4 commit af7cb37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions programs/bpf/rust/invoke/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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!(),
}

Expand Down

0 comments on commit af7cb37

Please sign in to comment.