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

@ -95,7 +95,6 @@ pub fn process_instruction(
_program_id: &Pubkey,
keyed_accounts: &mut [KeyedAccount],
data: &[u8],
_tick_height: u64,
) -> Result<(), InstructionError> {
solana_logger::setup();
@ -136,7 +135,7 @@ mod tests {
#[test]
fn test_vote_process_instruction_decode_bail() {
assert_eq!(
super::process_instruction(&Pubkey::default(), &mut [], &[], 0,),
super::process_instruction(&Pubkey::default(), &mut [], &[],),
Err(InstructionError::InvalidInstructionData),
);
}
@ -153,12 +152,7 @@ mod tests {
.zip(accounts.iter_mut())
.map(|(meta, account)| KeyedAccount::new(&meta.pubkey, meta.is_signer, account))
.collect();
super::process_instruction(
&Pubkey::default(),
&mut keyed_accounts,
&instruction.data,
0,
)
super::process_instruction(&Pubkey::default(), &mut keyed_accounts, &instruction.data)
}
}