Initializer
init(_:)
Parses a block header from its 80-byte serialized form.
init(_ data: Data) throws
Parameters
-
data
-
Exactly 80 bytes of serialized header data.
Discussion
The input must be exactly 80 bytes in the standard header layout. Parsing checks only that the data is structurally a header — no proof-of-work check, no linkage check. Those happen in processBlockHeader(_:state:).
Throws
KernelError.blockHeaderCreationFailed when the input is not exactly 80 bytes or otherwise fails to parse.