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

Method store_header

src/Core/BlockChain.cpp:564–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562}
563
564void BlockChain::store_header(const Hash &bid, const api::BlockHeader &header) {
565 auto key = HEADER_PREFIX + DB::to_binary_key(bid.data, sizeof(bid.data)) + HEADER_SUFFIX;
566 BinaryArray ba = seria::to_binary(header);
567 m_db.put(key, ba, true);
568}
569
570const api::BlockHeader *BlockChain::read_header_fast(const Hash &bid, Height hint) const {
571 if (get_tip_height() != Height(-1) && hint <= get_tip_height() &&

Callers

nothing calls this directly

Calls 2

to_binaryFunction · 0.85
putMethod · 0.45

Tested by

no test coverage detected