Skip to content

Commit

Permalink
set in call to true because transient data calls message() which has …
Browse files Browse the repository at this point in the history
…that assertion
  • Loading branch information
snissn committed Dec 10, 2024
1 parent e26e519 commit 4feec0f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions actors/evm/src/interpreter/precompiles/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ mod tests {
#[test]
fn bn_recover() {
let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

let input = &hex!(
Expand Down Expand Up @@ -357,6 +359,8 @@ mod tests {
let input = "foo bar baz boxy".as_bytes();

let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

let expected = hex!("ace8597929092c14bd028ede7b07727875788c7e130278b5afed41940d965aba");
Expand All @@ -370,6 +374,8 @@ mod tests {
let input = "foo bar baz boxy".as_bytes();

let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

let expected = hex!("0000000000000000000000004cd7a0452bd3d682e4cbd5fa90f446d7285b156a");
Expand All @@ -389,6 +395,8 @@ mod tests {
);

let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

let expected = hex!("08");
Expand Down Expand Up @@ -450,6 +458,8 @@ mod tests {
#[test]
fn bn_add() {
let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

let input = hex::decode(
Expand Down Expand Up @@ -519,6 +529,8 @@ mod tests {
];

let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

for (f, name) in tests {
Expand Down Expand Up @@ -546,6 +558,8 @@ mod tests {
&[(blake2f, "fail-blake2f")];

let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

for (f, name) in failures {
Expand All @@ -561,6 +575,8 @@ mod tests {
#[test]
fn bn_mul() {
let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

let input = hex::decode(
Expand Down Expand Up @@ -614,6 +630,8 @@ mod tests {
#[test]
fn bn_pair() {
let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

let input = hex::decode(
Expand Down Expand Up @@ -701,6 +719,8 @@ mod tests {
fn blake2() {
use super::blake2f;
let rt = MockRuntime::default();
rt.in_call.replace(true);

let mut system = System::create(&rt).unwrap();

// // helper to turn EIP test cases into something readable
Expand Down

0 comments on commit 4feec0f

Please sign in to comment.