6namespace sysio {
namespace chain {
8 namespace detail {
class block_log_impl; }
47 block_log(
const fc::path& data_dir, std::optional<block_log_prune_config> prune_config);
100 std::unique_ptr<detail::block_log_impl> my;
wraps boost::filesystem::path to provide platform independent path manipulation.
static bool trim_blocklog_front(const fc::path &block_dir, const fc::path &temp_dir, uint32_t truncate_at_block)
static const uint64_t npos
static std::optional< genesis_state > extract_genesis_state(const fc::path &data_dir)
static fc::path repair_log(const fc::path &data_dir, uint32_t truncate_at_block=0, const char *reversible_block_dir_name="")
signed_block_ptr read_head() const
static bool contains_chain_id(uint32_t version, uint32_t first_block_num)
const block_id_type & head_id() const
static bool is_supported_version(uint32_t version)
block_log(const fc::path &data_dir, std::optional< block_log_prune_config > prune_config)
static bool is_pruned_log(const fc::path &data_dir)
block_id_type read_block_id_by_num(uint32_t block_num) const
signed_block_ptr read_block(uint64_t file_pos) const
static const uint32_t min_supported_version
signed_block_ptr read_block_by_id(const block_id_type &id) const
signed_block_ptr read_block_by_num(uint32_t block_num) const
static void construct_index(const fc::path &block_file_name, const fc::path &index_file_name)
void read_block_header(block_header &bh, uint64_t file_pos) const
uint32_t first_block_num() const
void append(const signed_block_ptr &b)
static chain_id_type extract_chain_id(const fc::path &data_dir)
static bool contains_genesis_state(uint32_t version, uint32_t first_block_num)
uint64_t get_block_pos(uint32_t block_num) const
static const uint32_t max_supported_version
const signed_block_ptr & head() const
void reset(const genesis_state &gs, const signed_block_ptr &genesis_block)
std::shared_ptr< signed_block > signed_block_ptr
unsigned __int64 uint64_t
std::optional< size_t > vacuum_on_close
uint64_t block_pos(uint32_t n)
trim_data(fc::path block_dir)
uint64_t block_index(uint32_t n) const
static constexpr int blknum_offset