MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / make_header

Function make_header

nodedb-wal/src/record/header.rs:150–163  ·  view source on GitHub ↗
(record_type: u32, vshard_id: u32)

Source from the content-addressed store, hash-verified

148 use super::*;
149
150 fn make_header(record_type: u32, vshard_id: u32) -> RecordHeader {
151 RecordHeader {
152 magic: WAL_MAGIC,
153 format_version: WAL_FORMAT_VERSION,
154 record_type,
155 lsn: 42,
156 tenant_id: 7,
157 vshard_id,
158 payload_len: 100,
159 database_id: 0,
160 reserved: [0u8; 8],
161 crc32c: 0xDEAD_BEEF,
162 }
163 }
164
165 #[test]
166 fn header_roundtrip() {

Callers 7

header_roundtripFunction · 0.70
invalid_magic_detectedFunction · 0.70
version_4_rejectedFunction · 0.70
encrypted_flag_is_u32Function · 0.70

Calls

no outgoing calls

Tested by 7

header_roundtripFunction · 0.56
invalid_magic_detectedFunction · 0.56
version_4_rejectedFunction · 0.56
encrypted_flag_is_u32Function · 0.56