Beispiel #1
0
func ExportECChain(db interfaces.DBOverlay) error {
	fmt.Printf("ExportECChain\n")
	// get all ecBlocks from db
	ecBlocks, err := db.FetchAllECBlocks()
	if err != nil {
		return err
	}
	sort.Sort(util.ByECBlockIDAccending(ecBlocks))

	for _, block := range ecBlocks {
		err = ExportBlock(block.(interfaces.DatabaseBatchable))
		if err != nil {
			return err
		}
	}
	return nil
}