github.com/koko1123/flow-go-1@v0.29.6/model/chainsync/range.go (about) 1 // (c) 2019 Dapper Labs - ALL RIGHTS RESERVED 2 3 package chainsync 4 5 import "github.com/koko1123/flow-go-1/model/flow" 6 7 // Range is a height range for which we want to request blocks. inclusive [from, to] 8 type Range struct { 9 From uint64 10 To uint64 11 } 12 13 func (r *Range) Len() int { 14 return int(r.To - r.From + 1) 15 } 16 17 // Batch is a set of block IDs we want to request. 18 type Batch struct { 19 BlockIDs []flow.Identifier 20 }