4 "github.com/bytom/vapor/protocol"
5 "github.com/bytom/vapor/protocol/bc/types"
8 // GetLatestDownloadBlockHeight returns the current height of the node wait for download.
9 func GetLatestDownloadBlockHeight(c *protocol.Chain) uint64 {
10 return c.BestBlockHeight()
14 func Sync(c *protocol.Chain, blocks []*types.Block) error {
15 for i := 0; i < len(blocks); i++ {
16 _, err := c.ProcessBlock(blocks[i])