MCPcopy Create free account
hub / github.com/CPChain/chain / Export

Method Export

core/blockchain.go:586–588  ·  view source on GitHub ↗

Export writes the active chain to the given writer.

(w io.Writer)

Source from the content-addressed store, hash-verified

584
585// Export writes the active chain to the given writer.
586func (bc *BlockChain) Export(w io.Writer) error {
587 return bc.ExportN(w, uint64(0), bc.CurrentBlock().NumberU64())
588}
589
590// ExportN writes a subset of the active chain to the given writer.
591func (bc *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error {

Callers 1

ExportChainMethod · 0.45

Calls 3

ExportNMethod · 0.95
CurrentBlockMethod · 0.95
NumberU64Method · 0.80

Tested by

no test coverage detected