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

@ -2,7 +2,7 @@
#[macro_use]
extern crate alloc;
use solana_program::{custom_panic_default, entrypoint::SUCCESS, msg};
use solana_program::{custom_panic_default, entrypoint::SUCCESS, log::sol_log_64, msg};
use std::{alloc::Layout, mem};
#[no_mangle]
@ -46,7 +46,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 {
for i in 0..ITERS {
assert_eq!(*ptr.add(i as usize), i as u8);
}
msg!(0x3, 0, 0, 0, u64::from(*ptr.add(42)));
sol_log_64(0x3, 0, 0, 0, u64::from(*ptr.add(42)));
assert_eq!(*ptr.add(42), 42);
alloc::alloc::dealloc(ptr, layout);
}
@ -61,7 +61,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 {
for v in ones.iter() {
sum += ones[*v];
}
msg!(0x0, 0, 0, 0, sum as u64);
sol_log_64(0x0, 0, 0, 0, sum as u64);
assert_eq!(sum, ITERS);
}
@ -74,7 +74,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 {
for i in 0..ITERS {
v.push(i);
}
msg!(0x4, 0, 0, 0, v.len() as u64);
sol_log_64(0x4, 0, 0, 0, v.len() as u64);
assert_eq!(v.len(), ITERS);
}