| 240 | } |
| 241 | |
| 242 | LegacyBlockChainWriter::LegacyBlockChainWriter(const std::string &index_file_name, |
| 243 | const std::string &item_file_name, |
| 244 | uint64_t count) |
| 245 | : m_items_file(item_file_name, platform::O_CREATE_ALWAYS) |
| 246 | , m_indexes_file(index_file_name, platform::O_CREATE_ALWAYS) { |
| 247 | m_indexes_file.write(&count, sizeof(count)); |
| 248 | } |
| 249 | |
| 250 | void LegacyBlockChainWriter::write_block(const RawBlock &raw_block) { |
| 251 | BinaryArray ba = seria::to_binary(raw_block); |