MCPcopy Create free account
hub / github.com/bcndev/bytecoin / write_block

Method write_block

src/Core/BlockChainFileFormat.cpp:250–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void LegacyBlockChainWriter::write_block(const RawBlock &raw_block) {
251 BinaryArray ba = seria::to_binary(raw_block);
252 m_items_file.write(ba.data(), ba.size());
253 uint32_t si = static_cast<uint32_t>(ba.size());
254 m_indexes_file.write(&si, sizeof si);
255}
256
257bool LegacyBlockChainWriter::export_blockchain2(const std::string &index_file_name, const std::string &item_file_name,
258 const BlockChainState &block_chain, Height max_height) {

Callers 1

export_blockchain2Method · 0.80

Calls 4

to_binaryFunction · 0.85
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected