Moves InvokeContext::return_data to TransactionContext. (#22411)

This commit is contained in:
Alexander Meißner
2022-01-10 18:26:51 +01:00
committed by GitHub
parent 9bc2592da1
commit aadf4b9b63
5 changed files with 21 additions and 11 deletions

View File

@ -180,8 +180,12 @@ impl TransactionContext {
}
/// Set the return data of the current InstructionContext
pub fn set_return_data(&mut self, data: Vec<u8>) -> Result<(), InstructionError> {
self.return_data = (*self.get_program_key()?, data);
pub fn set_return_data(
&mut self,
program_id: Pubkey,
data: Vec<u8>,
) -> Result<(), InstructionError> {
self.return_data = (program_id, data);
Ok(())
}
}