Skip to content

Commit

Permalink
Ensure state test has accessLists and currentRandom
Browse files Browse the repository at this point in the history
  • Loading branch information
pdobacz committed Sep 10, 2024
1 parent 52e8d22 commit 2d4d96f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/unittests/state_transition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ void state_transition::export_state_test(
jenv["currentGasLimit"] = hex0x(block.gas_limit);
jenv["currentCoinbase"] = hex0x(block.coinbase);
jenv["currentBaseFee"] = hex0x(block.base_fee);
jenv["currentRandom"] = hex0x(block.prev_randao);

jt["pre"] = to_json(pre);

Expand Down Expand Up @@ -211,6 +212,9 @@ void state_transition::export_state_test(
jtx["gasLimit"][0] = hex0x(tx.gas_limit);
jtx["value"][0] = hex0x(tx.value);

if (tx.type >= Transaction::Type::access_list)
jtx["accessLists"][0] = json::json::array({});

if (!tx.access_list.empty())
{
auto& ja = jtx["accessLists"][0];
Expand Down

0 comments on commit 2d4d96f

Please sign in to comment.