Fail secp256k1 if the instruction data looks incorrect (#19300)

This commit is contained in:
Jack May
2021-08-19 13:13:54 -07:00
committed by GitHub
parent f59a55be17
commit 3ec33e7d02
9 changed files with 74 additions and 12 deletions

View File

@ -44,7 +44,7 @@ pub mod test {
Hash::default(),
);
assert!(tx.verify_precompiles(false).is_ok());
assert!(tx.verify_precompiles(false, true).is_ok());
let index = thread_rng().gen_range(0, secp_instruction.data.len());
secp_instruction.data[index] = secp_instruction.data[index].wrapping_add(12);
@ -54,6 +54,6 @@ pub mod test {
&[&mint_keypair],
Hash::default(),
);
assert!(tx.verify_precompiles(false).is_err());
assert!(tx.verify_precompiles(false, true).is_err());
}
}