Skip to content

Commit

Permalink
fix test_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
elmato committed Sep 6, 2023
1 parent 59816f3 commit abbed7c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test_actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ using namespace silkworm;
Block block;
block.header = bi.get_block_header();

evm_runtime::test::engine engine;
evm_runtime::test::engine engine{evm_runtime::test::kTestNetwork};
evm_runtime::state state{get_self(), get_self()};
silkworm::ExecutionProcessor ep{block, engine, state, evm_runtime::test::kTestNetwork};

if(orlptx) {
Transaction tx;
ByteView bv{(const uint8_t*)orlptx->data(), orlptx->size()};
eosio::check(rlp::decode(bv,tx) == DecodingResult::kOk && bv.empty(), "unable to decode transaction");
eosio::check(rlp::decode(bv,tx) && bv.empty(), "unable to decode transaction");

execute_tx(eosio::name{}, block, tx, ep, false);
}
engine.finalize(ep.state(), ep.evm().block(), ep.evm().revision());
engine.finalize(ep.state(), ep.evm().block());
ep.state().write_to_db(ep.evm().block().header.number);
}

Expand Down Expand Up @@ -195,8 +195,8 @@ using namespace silkworm;
Account tmp;
ByteView bv{(const uint8_t *)data.data(), data.size()};
auto dec_res = Account::from_encoded_storage(bv);
eosio::check(dec_res.second == DecodingResult::kOk, "unable to decode account");
res = dec_res.first;
eosio::check(!!dec_res, "unable to decode account");
res = *dec_res;
}
return res;
};
Expand Down

0 comments on commit abbed7c

Please sign in to comment.