[][src]Module grin_chain::pipe

Implementation of the chain block acceptance (or refusal) pipeline.



Contextual information required to process a new block and either reject or accept it.



Runs the block processing pipeline, including validation and finding a place for the new block in the chain. Returns new head if chain head updated.


Process a block header. Update the header MMR and corresponding header_head if this header increases the total work relative to header_head. Note: In contrast to processing a full block we treat "already known" as success to allow processing to continue (for header itself).


Utility function to handle forks. From the forked block, jump backward to find to fork point. Rewind the txhashset to the fork point and apply all necessary blocks prior to the one being processed to set the txhashset in the expected state.


Rewind the header chain and reapply headers on a fork.


Sync a chunk of block headers. This is only used during header sync.