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

@ -70,7 +70,6 @@ pub fn process_instruction(
_program_id: &Pubkey,
keyed_accounts: &mut [KeyedAccount],
data: &[u8],
_tick_height: u64,
) -> Result<(), InstructionError> {
if let Ok(instruction) = bincode::deserialize(data) {
trace!("process_instruction: {:?}", instruction);
@ -246,7 +245,7 @@ mod tests {
program_id: another_program_owner,
};
let data = serialize(&instruction).unwrap();
let result = process_instruction(&system_program::id(), &mut keyed_accounts, &data, 0);
let result = process_instruction(&system_program::id(), &mut keyed_accounts, &data);
assert_eq!(result, Err(InstructionError::IncorrectProgramId));
assert_eq!(from_account.owner, new_program_owner);
}