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

@@ -59,7 +59,6 @@ pub fn entrypoint(
program_id: &Pubkey,
keyed_accounts: &mut [KeyedAccount],
ix_data: &[u8],
tick_height: u64,
symbol_cache: &SymbolCache,
) -> Result<(), InstructionError> {
if keyed_accounts[0].account.executable {
@@ -68,7 +67,7 @@ pub fn entrypoint(
let name_vec = &names[0].account.data;
if let Some(entrypoint) = symbol_cache.read().unwrap().get(name_vec) {
unsafe {
return entrypoint(program_id, params, ix_data, tick_height);
return entrypoint(program_id, params, ix_data);
}
}
let name = match str::from_utf8(name_vec) {
@@ -95,7 +94,7 @@ pub fn entrypoint(
return Err(InstructionError::GenericError);
}
};
let ret = entrypoint(program_id, params, ix_data, tick_height);
let ret = entrypoint(program_id, params, ix_data);
symbol_cache
.write()
.unwrap()