diff --git a/web3.js/examples/bpf-rust-noop/src/lib.rs b/web3.js/examples/bpf-rust-noop/src/lib.rs index 4fa2a549c1..7846c529ad 100644 --- a/web3.js/examples/bpf-rust-noop/src/lib.rs +++ b/web3.js/examples/bpf-rust-noop/src/lib.rs @@ -19,8 +19,6 @@ fn return_sstruct() -> SStruct { } fn process(ka: &mut [SolKeyedAccount], data: &[u8], info: &SolClusterInfo) -> bool { - sol_log("Tick height:"); - sol_log_64(info.tick_height, 0, 0, 0, 0); sol_log("Program identifier:"); sol_log_key(&info.program_id); diff --git a/web3.js/examples/bpf-rust-noop/src/solana_sdk.rs b/web3.js/examples/bpf-rust-noop/src/solana_sdk.rs index 248a63a7cb..b1672eaec1 100644 --- a/web3.js/examples/bpf-rust-noop/src/solana_sdk.rs +++ b/web3.js/examples/bpf-rust-noop/src/solana_sdk.rs @@ -156,8 +156,6 @@ pub struct SolKeyedAccount<'a> { /// Information about the state of the cluster immediately before the program /// started executing the current instruction pub struct SolClusterInfo<'a> { - /// Current ledger tick - pub tick_height: u64, ///program_id of the currently executing program pub program_id: SolPubkey<'a>, } @@ -234,15 +232,6 @@ pub extern "C" fn entrypoint(input: *mut u8) -> bool { let data = unsafe { from_raw_parts(input.add(offset), data_length) }; offset += data_length; - // Tick height - - let tick_height = unsafe { - #[allow(clippy::cast_ptr_alignment)] - let tick_height_ptr: *const u64 = input.add(offset) as *const u64; - *tick_height_ptr - }; - offset += size_of::(); - // Id let program_id_slice = unsafe { from_raw_parts(input.add(offset), SIZE_PUBKEY) }; @@ -251,7 +240,6 @@ pub extern "C" fn entrypoint(input: *mut u8) -> bool { }; let info = SolClusterInfo { - tick_height, program_id, }; @@ -393,7 +381,6 @@ mod tests { let d = [1, 0, 0, 0, 0, 0, 0, 0, 1]; assert_eq!(9, data.len()); assert_eq!(d, data); - assert_eq!(1, info.tick_height); let program_id = [ 190, 103, 191, 69, 193, 202, 38, 193, 95, 62, 131, 135, 105, 13, 142, 240, 155, 120, 177, 90, 212, 54, 10, 118, 40, 33, 192, 8, 54, 141, 187, 63, diff --git a/web3.js/test/fixtures/noop-rust/solana_bpf_rust_noop.so b/web3.js/test/fixtures/noop-rust/solana_bpf_rust_noop.so index 1ec01e806b..7a307f576e 100755 Binary files a/web3.js/test/fixtures/noop-rust/solana_bpf_rust_noop.so and b/web3.js/test/fixtures/noop-rust/solana_bpf_rust_noop.so differ