Documentation
¶
Overview ¶
Package block_copy provides functions for copying block DAGs between stores.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyBlockDAG ¶
func CopyBlockDAG( ctx context.Context, rootRef *block.BlockRef, rootCtor block.Ctor, src block.StoreOps, dest block.StoreOps, ) error
CopyBlockDAG copies all blocks reachable from rootRef from src to dest. Missing blocks are written to dest. Existing destination blocks are still decoded and traversed when their constructors are known, so a partial destination DAG can be completed. rootCtor is the constructor for the root block type. For child blocks, uses BlockWithRefs.GetBlockRefCtor to get constructors. If a child block's constructor is nil, the block data is still copied but its children cannot be traversed (leaf copy).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.