Add msg! macro for program logging, deprecate info! macro (#13885)
(cherry picked from commit 6705b5a98c)
Co-authored-by: Michael Vines <mvines@gmail.com>
			
			
This commit is contained in:
		@@ -4,7 +4,7 @@ use solana_program::{
 | 
			
		||||
    account_info::AccountInfo,
 | 
			
		||||
    entrypoint,
 | 
			
		||||
    entrypoint::{ProgramResult, HEAP_LENGTH, HEAP_START_ADDRESS},
 | 
			
		||||
    info,
 | 
			
		||||
    msg,
 | 
			
		||||
    pubkey::Pubkey,
 | 
			
		||||
};
 | 
			
		||||
use std::{
 | 
			
		||||
@@ -58,7 +58,7 @@ fn process_instruction(
 | 
			
		||||
    _accounts: &[AccountInfo],
 | 
			
		||||
    _instruction_data: &[u8],
 | 
			
		||||
) -> ProgramResult {
 | 
			
		||||
    info!("Custom heap");
 | 
			
		||||
    msg!("Custom heap");
 | 
			
		||||
    unsafe {
 | 
			
		||||
        let layout = Layout::from_size_align(usize::MAX - 0x42, align_of::<u8>()).unwrap();
 | 
			
		||||
        let ptr = alloc(layout);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user