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

Method ErrorWrongHeight

src/rpc_api.cpp:16–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14api::ErrorAddress::ErrorAddress(int c, const std::string &msg, const std::string &address)
15 : json_rpc::Error(c, msg + " address=" + address), address(address) {}
16api::ErrorWrongHeight::ErrorWrongHeight(const std::string &msg, int64_t request_height, Height top_block_height)
17 : json_rpc::Error(INVALID_HEIGHT_OR_DEPTH,
18 msg + "=" + common::to_string(request_height) + " while top block height is " +
19 common::to_string(top_block_height))
20 , request_height(request_height)
21 , top_block_height(top_block_height) {}
22Height api::ErrorWrongHeight::fix_height_or_depth(
23 HeightOrDepth ha, Height tip_height, bool throw_on_too_big_height, bool throw_on_too_big_depth, Height max_depth) {
24 if (ha < 0) {

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.50

Tested by

no test coverage detected