Changeset View
Changeset View
Standalone View
Standalone View
chronik/chronik-cpp/chronik_bridge.cpp
Show First 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | chronik_bridge::Block BridgeBlock(const CBlock &block, | ||||
return {.hash = chronik::util::HashToArray(block.GetHash()), | return {.hash = chronik::util::HashToArray(block.GetHash()), | ||||
.prev_hash = chronik::util::HashToArray(block.hashPrevBlock), | .prev_hash = chronik::util::HashToArray(block.hashPrevBlock), | ||||
.n_bits = block.nBits, | .n_bits = block.nBits, | ||||
.timestamp = block.GetBlockTime(), | .timestamp = block.GetBlockTime(), | ||||
.height = bindex.nHeight, | .height = bindex.nHeight, | ||||
.file_num = uint32_t(bindex.nFile), | .file_num = uint32_t(bindex.nFile), | ||||
.data_pos = bindex.nDataPos, | .data_pos = bindex.nDataPos, | ||||
.undo_pos = bindex.nUndoPos, | .undo_pos = bindex.nUndoPos, | ||||
.size = bindex.nSize, | |||||
.txs = bridged_txs}; | .txs = bridged_txs}; | ||||
} | } | ||||
namespace chronik_bridge { | namespace chronik_bridge { | ||||
void log_print(const rust::Str logging_function, const rust::Str source_file, | void log_print(const rust::Str logging_function, const rust::Str source_file, | ||||
const uint32_t source_line, const rust::Str msg) { | const uint32_t source_line, const rust::Str msg) { | ||||
LogInstance().LogPrintStr(std::string(msg), std::string(logging_function), | LogInstance().LogPrintStr(std::string(msg), std::string(logging_function), | ||||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |