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) {