Skip to main content

Module union

Module union 

Source
Expand description

Helpers for SSZ Union types (used by Option<T> and derived enums).

The wire form of a Union is selector_byte || payload. The hash form mixes the selector via mix_in_selector over the payload root.

Functionsยง

option_selector_hash
Compute the hash for an Option<T>-style Union root. The selector (0 for None, 1 for Some) is mixed in via the standard mix_in_selector.