block_copy

package
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL