Add tick height syscall (#4497)

* Remove tick_height from entrypoint signature

* Impl tick_height syscall and use in storage program

* Properly remove tick height from bpf handling
This commit is contained in:
Tyera Eulberg
2019-05-31 16:29:21 -06:00
committed by GitHub
parent ce04d2bfc2
commit 64e8a21d73
22 changed files with 153 additions and 107 deletions

View File

@ -32,8 +32,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>,
}
@ -142,12 +140,6 @@ pub unsafe fn deserialize<'a>(
let data = { from_raw_parts(input.add(offset), data_length) };
offset += data_length;
// Tick height
#[allow(clippy::cast_ptr_alignment)]
let tick_height = *(input.add(offset) as *const u64);
offset += size_of::<u64>();
// Id
let program_id = {
@ -157,7 +149,6 @@ pub unsafe fn deserialize<'a>(
};
let info = SolClusterInfo {
tick_height,
program_id,
};