Commit 35b7475 1 parent ad04d4e commit 35b7475 Copy full SHA for 35b7475
File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace evmone::test
8
8
{
9
9
json::json to_json (const TestState& state)
10
10
{
11
- json::json j;
11
+ json::json j = json::json::object () ;
12
12
for (const auto & [addr, acc] : state)
13
13
{
14
14
auto & j_acc = j[hex0x (addr)];
Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ template <>
273
273
TestState from_json<TestState>(const json::json& j)
274
274
{
275
275
TestState o;
276
+ assert (j.is_object ());
276
277
for (const auto & [j_addr, j_acc] : j.items ())
277
278
{
278
279
auto & acc =
Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ void state_transition::export_state_test(
180
180
jenv[" currentGasLimit" ] = hex0x (block.gas_limit );
181
181
jenv[" currentCoinbase" ] = hex0x (block.coinbase );
182
182
jenv[" currentBaseFee" ] = hex0x (block.base_fee );
183
+ jenv[" currentRandom" ] = hex0x (block.prev_randao );
183
184
184
185
jt[" pre" ] = to_json (pre);
185
186
@@ -204,6 +205,10 @@ void state_transition::export_state_test(
204
205
jtx[" gasLimit" ][0 ] = hex0x (tx.gas_limit );
205
206
jtx[" value" ][0 ] = hex0x (tx.value );
206
207
208
+ // Force `accessLists` output even if empty.
209
+ if (tx.type >= Transaction::Type::access_list)
210
+ jtx[" accessLists" ][0 ] = json::json::array ();
211
+
207
212
if (!tx.access_list .empty ())
208
213
{
209
214
auto & ja = jtx[" accessLists" ][0 ];
You can’t perform that action at this time.
0 commit comments