Serializes the btck_BlockHeader to bytes. This is consensus serialization that is also used for the P2P network.

Synopsis

Declared in <kernel/bitcoinkernel.h>

[[nodiscard, __nonnull__]]
int
btck_block_header_to_bytes(
    btck_BlockHeader const* header,
    unsigned char output[]);

Return Value

0 on success.

Note

The return value should not be discarded.

Parameters

Name

Description

header [in]

Non‐null.

output [out]

The serialized block header (80 bytes).

Created with MrDocs