Skip to content

Commit

Permalink
change integration test to reveal a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed May 31, 2022
1 parent dc4bc41 commit 87b6c58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions integration_tests/test_replay_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_replay_block(custom_cronos):
contract.functions.test(iterations).buildTransaction(
{
"nonce": nonce + 1,
"gas": gas_limit,
"gas": gas_limit + 1,
"gasPrice": gas_price,
}
),
Expand Down Expand Up @@ -70,8 +70,8 @@ def test_replay_block(custom_cronos):

# the second tx should fail and cost the whole gasLimit
assert receipt2.status == 0
assert receipt2.gasUsed == gas_limit
assert receipt2.cumulativeGasUsed == receipt1.cumulativeGasUsed + gas_limit
assert receipt2.gasUsed == gas_limit + 1
assert receipt2.cumulativeGasUsed == receipt1.cumulativeGasUsed + gas_limit + 1

# check get block apis
assert w3.eth.get_block(receipt1.blockNumber).transactions == [
Expand Down Expand Up @@ -116,4 +116,4 @@ def test_replay_block(custom_cronos):
assert 2 == len(rsp["result"])
replay_receipts = [AttributeDict(receipt_formatter(item)) for item in rsp["result"]]
assert replay_receipts[1].status == 0
assert replay_receipts[1].gasUsed == gas_limit
assert replay_receipts[1].gasUsed == gas_limit + 1

0 comments on commit 87b6c58

Please sign in to comment.