Add support for BPF program custom errors (#5743)
* Add support for BPF program custom errors * Rename SOL_SUCCESS -> SUCCESS
This commit is contained in:
@ -2,10 +2,11 @@
|
||||
|
||||
extern crate solana_sdk;
|
||||
use solana_bpf_rust_param_passing_dep::{Data, TestDep};
|
||||
use solana_sdk::entrypoint::SUCCESS;
|
||||
use solana_sdk::info;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn entrypoint(_input: *mut u8) -> bool {
|
||||
pub extern "C" fn entrypoint(_input: *mut u8) -> u32 {
|
||||
let array = [0xA, 0xB, 0xC, 0xD, 0xE, 0xF];
|
||||
let data = Data {
|
||||
twentyone: 21u64,
|
||||
@ -18,5 +19,6 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> bool {
|
||||
|
||||
let test_dep = TestDep::new(&data, 1, 2, 3, 4, 5);
|
||||
info!(0, 0, 0, 0, test_dep.thirty);
|
||||
test_dep.thirty == 30
|
||||
assert!(test_dep.thirty == 30);
|
||||
SUCCESS
|
||||
}
|
||||
|
Reference in New Issue
Block a user