MCPcopy Create free account
hub / github.com/citp/BlockSci / hash_addressrange

Function hash_addressrange

tools/integrity_check/main.cpp:287–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285 */
286template<AddressType::Enum type>
287void hash_addressrange(SHA256_CTX &sha256, const DataAccess &access) {
288 auto &hashIndex = access.hashIndex;
289 auto rng = hashIndex->getAddressRange<type>();
290 RANGES_FOR(auto pair, rng) {
291 SHA256_Update(&sha256, &pair.first, sizeof(pair.first));
292 SHA256_Update(&sha256, &pair.second, sizeof(pair.second));
293 }
294}
295
296/**
297 Compute a checksum over all addres ranges in hash index.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected