From 3c96e41bae1604b070b25e59dcc3381b60ab1b66 Mon Sep 17 00:00:00 2001 From: rodiazet Date: Wed, 29 Mar 2023 16:46:21 +0200 Subject: [PATCH] t8n: Output `txs.rlp` file with all transactions Returning for exec-spec-tests. --- test/t8n/t8n.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/t8n/t8n.cpp b/test/t8n/t8n.cpp index 3431e3348f..5c62ab5f31 100644 --- a/test/t8n/t8n.cpp +++ b/test/t8n/t8n.cpp @@ -27,6 +27,7 @@ int main(int argc, const char* argv[]) fs::path output_dir; fs::path output_result_file; fs::path output_alloc_file; + fs::path output_body_file; std::optional block_reward; uint64_t chain_id = 0; @@ -59,6 +60,8 @@ int main(int argc, const char* argv[]) block_reward = intx::from_string(argv[i]); else if (arg == "--state.chainid" && ++i < argc) chain_id = intx::from_string(argv[i]); + else if (arg == "--output.body" && ++i < argc) + output_body_file = argv[i]; } state::BlockInfo block; @@ -182,6 +185,9 @@ int main(int argc, const char* argv[]) } std::ofstream{output_dir / output_alloc_file} << std::setw(2) << j_alloc; + + if (!output_body_file.empty()) + std::ofstream{output_dir / output_body_file} << hex0x(rlp::encode(transactions)); } catch (const std::exception& e) {