Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mason Liang committed Jul 3, 2023
1 parent 3575aab commit e01b6bc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions zkevm-circuits/src/evm_circuit/execution/end_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,4 +488,29 @@ mod test {
.unwrap(),
);
}

#[test]
fn end_tx_gadget_nonexisting_coinbase() {
test_ok(
TestContext::<2, 2>::new(
None,
account_0_code_account_1_no_code(bytecode! {
COINBASE
EXTCODEHASH
}), // EXTCODEHASH will return 0 for the first tx and the empty code hash for the second tx.
|mut txs, accs| {
txs[0]
.to(accs[0].address)
.from(accs[1].address)
.value(eth(1));
txs[1]
.to(accs[0].address)
.from(accs[1].address)
.value(eth(1));
},
|block, _| block,
)
.unwrap(),
);
}
}

0 comments on commit e01b6bc

Please sign in to comment.