MCPcopy Create free account
hub / github.com/ElementsProject/elements / FixChecksum

Method FixChecksum

src/leveldb/db/log_test.cc:90–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 void FixChecksum(int header_offset, int len) {
91 // Compute crc of type/len/data
92 uint32_t crc = crc32c::Value(&dest_.contents_[header_offset + 6], 1 + len);
93 crc = crc32c::Mask(crc);
94 EncodeFixed32(&dest_.contents_[header_offset], crc);
95 }
96
97 void ForceError() { source_.force_error_ = true; }
98

Callers

nothing calls this directly

Calls 3

ValueFunction · 0.85
EncodeFixed32Function · 0.85
MaskFunction · 0.50

Tested by

no test coverage detected