Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBackup ¶
func CreateBackup( conn *grpc.ClientConn, logger hclog.Logger, from uint64, to *uint64, outPath string, ) (uint64, uint64, error)
CreateBackup fetches blockchain data with the specific range via gRPC and save this data as binary archive to given path
func RestoreChain ¶
func RestoreChain(chain blockchainInterface, filePath string, progression *progress.ProgressionWrapper) error
RestoreChain reads blocks from the archive and write to the chain
Types ¶
type Metadata ¶
Metadata is the data stored in the beginning of backup
func (*Metadata) MarshalRLP ¶
MarshalRLP returns RLP encoded bytes
func (*Metadata) MarshalRLPTo ¶
MarshalRLPTo sets RLP encoded bytes to given byte slice
func (*Metadata) MarshalRLPWith ¶
MarshalRLPWith appends own field into arena for encode
func (*Metadata) UnmarshalRLP ¶
UnmarshalRLP unmarshals and sets the fields from RLP encoded bytes
Click to show internal directories.
Click to hide internal directories.