add checked instructions sysvar api (#20790)

This commit is contained in:
Jack May
2021-10-19 21:01:58 -07:00
committed by GitHub
parent 58164517e4
commit a8098f37d0
5 changed files with 116 additions and 7 deletions

View File

@ -54,6 +54,7 @@ fn bench_manual_instruction_deserialize(b: &mut Bencher) {
let serialized = message.serialize_instructions(DEMOTE_PROGRAM_WRITE_LOCKS);
b.iter(|| {
for i in 0..instructions.len() {
#[allow(deprecated)]
test::black_box(instructions::load_instruction_at(i, &serialized).unwrap());
}
});
@ -67,6 +68,7 @@ fn bench_manual_instruction_deserialize_single(b: &mut Bencher) {
.unwrap();
let serialized = message.serialize_instructions(DEMOTE_PROGRAM_WRITE_LOCKS);
b.iter(|| {
#[allow(deprecated)]
test::black_box(instructions::load_instruction_at(3, &serialized).unwrap());
});
}