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

Method get_block_header_prehash

src/CryptoNote.cpp:540–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540Hash cn::get_block_header_prehash(const BlockHeader &bh, const BlockBodyProxy &body_proxy) {
541 // get_object_hash prepends array size before hashing.
542 // this was a mistake of initial cryptonote developers
543 Hash ha2 = get_object_hash(seria::to_binary(bh, BlockSeriaType::PREHASH, body_proxy), nullptr);
544 // std::cout << "ha: " << ha2 << " ba: " << common::to_hex(result.data(), result.size()) << std::endl;
545 return ha2;
546}
547
548BinaryArray cn::get_block_pow_hashing_data(const BlockHeader &bh,
549 const BlockBodyProxy &body_proxy,

Callers

nothing calls this directly

Calls 2

get_object_hashFunction · 0.85
to_binaryFunction · 0.85

Tested by

no test coverage detected