Exemplo n.º 1
0
func ExportFctChain(db interfaces.DBOverlay) error {
	fmt.Printf("ExportFctChain\n")
	// get all aBlocks from db
	fBlocks, err := db.FetchAllFBlocks()
	if err != nil {
		return err
	}
	sort.Sort(util.ByFBlockIDAccending(fBlocks))

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