pub trait HeaderBuilder<H> where
    H: HeaderInner
{ fn build(self, common: HeaderBuilderCommon) -> H; }
Expand description

Builder for non-genesis Headers

SourceChain::put takes one of these rather than a raw Header, so that it can inject the proper values via HeaderBuilderCommon, rather than requiring surrounding code to construct a proper Header outside of the context of the SourceChain.

This builder does not build pre-genesis Headers, because prior to genesis there is no Agent associated with the source chain, and also the fact that the Dna header has no prev_entry causes a special case that need not be dealt with. SourceChain::genesis already handles genesis in one fell swoop.

Required Methods

Implementors