Remove the 5 integer msg! form

(cherry picked from commit c5c699a918)
This commit is contained in:
Michael Vines
2021-12-10 13:13:30 -08:00
parent 0576d133ad
commit c1f54c22ed
8 changed files with 25 additions and 44 deletions

View File

@ -1,6 +1,6 @@
//! Example Rust-based BPF program that tests call depth and stack usage
use solana_program::{custom_panic_default, entrypoint::SUCCESS, msg};
use solana_program::{custom_panic_default, entrypoint::SUCCESS, log::sol_log_64, msg};
#[inline(never)]
pub fn recurse(data: &mut [u8]) {
@ -8,7 +8,7 @@ pub fn recurse(data: &mut [u8]) {
return;
}
recurse(&mut data[1..]);
msg!(line!(), 0, 0, 0, data[0]);
sol_log_64(line!() as u64, 0, 0, 0, data[0] as u64);
}
/// # Safety
@ -17,7 +17,7 @@ pub fn recurse(data: &mut [u8]) {
pub unsafe extern "C" fn entrypoint(input: *mut u8) -> u64 {
msg!("Call depth");
let depth = *(input.add(16) as *mut u8);
msg!(line!(), 0, 0, 0, depth);
sol_log_64(line!() as u64, 0, 0, 0, depth as u64);
let mut data = Vec::with_capacity(depth as usize);
for i in 0_u8..depth {
data.push(i);