Monero
Loading...
Searching...
No Matches
BootstrapFile Class Reference

#include <bootstrap_file.h>

Collaboration diagram for BootstrapFile:

Public Member Functions

uint64_t count_bytes (std::ifstream &import_file, uint64_t blocks, uint64_t &h, bool &quit)
uint64_t count_blocks (const std::string &dir_path, std::streampos &start_pos, uint64_t &seek_height, uint64_t &block_first)
uint64_t count_blocks (const std::string &dir_path)
uint64_t seek_to_first_chunk (std::ifstream &import_file, uint8_t &major_version, uint8_t &minor_version, uint64_t &block_first, uint64_t &block_last)
bool store_blockchain_raw (cryptonote::Blockchain *cs, cryptonote::tx_memory_pool *txp, boost::filesystem::path &output_file, uint64_t start_block=0, uint64_t stop_block=0)

Protected Types

typedef std::vector< char > buffer_type

Protected Member Functions

bool open_writer (const boost::filesystem::path &file_path, uint64_t start_block, uint64_t stop_block)
bool initialize_file (uint64_t start_block, uint64_t stop_block)
bool close ()
void write_block (block &block)
void flush_chunk ()

Protected Attributes

Blockchainm_blockchain_storage
tx_memory_poolm_tx_pool
std::ofstream * m_raw_data_file
buffer_type m_buffer
boost::iostreams::stream< boost::iostreams::back_insert_device< buffer_type > > * m_output_stream

Private Attributes

uint64_t m_height
uint64_t m_cur_height
uint32_t m_max_chunk

Member Typedef Documentation

◆ buffer_type

typedef std::vector<char> BootstrapFile::buffer_type
protected

Member Function Documentation

◆ close()

bool BootstrapFile::close ( )
protected

◆ count_blocks() [1/2]

uint64_t BootstrapFile::count_blocks ( const std::string & dir_path)

◆ count_blocks() [2/2]

uint64_t BootstrapFile::count_blocks ( const std::string & dir_path,
std::streampos & start_pos,
uint64_t & seek_height,
uint64_t & block_first )

◆ count_bytes()

uint64_t BootstrapFile::count_bytes ( std::ifstream & import_file,
uint64_t blocks,
uint64_t & h,
bool & quit )

◆ flush_chunk()

void BootstrapFile::flush_chunk ( )
protected

◆ initialize_file()

bool BootstrapFile::initialize_file ( uint64_t start_block,
uint64_t stop_block )
protected

◆ open_writer()

bool BootstrapFile::open_writer ( const boost::filesystem::path & file_path,
uint64_t start_block,
uint64_t stop_block )
protected

◆ seek_to_first_chunk()

uint64_t BootstrapFile::seek_to_first_chunk ( std::ifstream & import_file,
uint8_t & major_version,
uint8_t & minor_version,
uint64_t & block_first,
uint64_t & block_last )

◆ store_blockchain_raw()

bool BootstrapFile::store_blockchain_raw ( cryptonote::Blockchain * cs,
cryptonote::tx_memory_pool * txp,
boost::filesystem::path & output_file,
uint64_t start_block = 0,
uint64_t stop_block = 0 )

◆ write_block()

void BootstrapFile::write_block ( block & block)
protected

Member Data Documentation

◆ m_blockchain_storage

Blockchain* BootstrapFile::m_blockchain_storage
protected

◆ m_buffer

buffer_type BootstrapFile::m_buffer
protected

◆ m_cur_height

uint64_t BootstrapFile::m_cur_height
private

◆ m_height

uint64_t BootstrapFile::m_height
private

◆ m_max_chunk

uint32_t BootstrapFile::m_max_chunk
private

◆ m_output_stream

boost::iostreams::stream<boost::iostreams::back_insert_device<buffer_type> >* BootstrapFile::m_output_stream
protected

◆ m_raw_data_file

std::ofstream* BootstrapFile::m_raw_data_file
protected

◆ m_tx_pool

tx_memory_pool* BootstrapFile::m_tx_pool
protected

The documentation for this class was generated from the following files: