Serializes the block through the passed in callback to bytes. This is consensus serialization that is also used for the P2P network.
Declared in <kernel/bitcoinkernel.h>
[[nodiscard, __nonnull__]]
int
btck_block_to_bytes(
btck_Block const* block,
btck_WriteBytes writer,
void* user_data);
| Name | Description |
|---|---|
| block [in] | Non-null. |
| writer [in] | Non-null, callback to a write bytes function. |
| user_data [in] | Holds a user-defined opaque structure that will be passed back through the writer callback. |