245 bool do_check(
uint8_t block_version,
uint8_t voting_version)
const;
261 uint8_t default_threshold_percent;
264 uint64_t original_version_till_height;
266 std::vector<Params> heights;
268 std::deque<uint8_t> versions;
269 unsigned int last_versions[256];
The BlockchainDB backing store interface declaration/contract.
uint8_t get_ideal_version() const
returns the latest "ideal" version
bool add(const cryptonote::block &block, uint64_t height)
add a new block
void on_block_popped(uint64_t new_chain_height)
called when one or more blocks are popped from the blockchain
static const uint64_t DEFAULT_WINDOW_SIZE
void init()
initialize the object
uint8_t get_current_version() const
returns the current version
bool reorganize_from_block_height(uint64_t height)
called when the blockchain is reorganized
static const uint8_t DEFAULT_THRESHOLD_PERCENT
bool get_voting_info(uint8_t version, uint32_t &window, uint32_t &votes, uint32_t &threshold, uint64_t &earliest_height, uint8_t &voting) const
returns information about current voting state
uint8_t get_next_version() const
returns the next version
static const uint64_t DEFAULT_ORIGINAL_VERSION_TILL_HEIGHT
bool add_fork(uint8_t version, uint64_t height, uint8_t threshold, time_t time)
add a new hardfork height
static const time_t DEFAULT_UPDATE_TIME
static const time_t DEFAULT_FORKED_TIME
uint64_t get_earliest_ideal_height_for_version(uint8_t version) const
returns the earliest block a given version may activate
uint64_t get_window_size() const
returns the size of the voting window in blocks
bool reorganize_from_chain_height(uint64_t height)
bool check(const cryptonote::block &block) const
check whether a new block would be accepted
bool check_for_height(const cryptonote::block &block, uint64_t height) const
same as check, but for a particular height, rather than the top
HardFork(cryptonote::BlockchainDB &db, uint8_t original_version=1, uint64_t original_version_till_height=DEFAULT_ORIGINAL_VERSION_TILL_HEIGHT, time_t forked_time=DEFAULT_FORKED_TIME, time_t update_time=DEFAULT_UPDATE_TIME, uint64_t window_size=DEFAULT_WINDOW_SIZE, uint8_t default_threshold_percent=DEFAULT_THRESHOLD_PERCENT)
creates a new HardFork object
uint8_t get(uint64_t height) const
returns the hard fork version for the given block height
Holds cryptonote related classes and helpers.
version
Supported socks variants.
unsigned __int64 uint64_t
Params(uint8_t version, uint64_t height, uint8_t threshold, time_t time)