func (f *asyncFinder) asyncAt(ctx context.Context, at, after int64) (swarm.Chunk, error) {
	c := make(chan *result)
	go f.at(ctx, at, newPath(at), &epoch{0, maxLevel}, c)
LOOP:
	for r := range c {
		p := r.path
		// ignore result from paths already  cancelled
		select {
		case <-p.cancel:
			continue LOOP
		default:
		}
		if r.chunk != nil { // update chunk for epoch found
			if r.level == 0 { // return if deepest level epoch
				return r.chunk, nil
			}
			// ignore if higher level than the deepest epoch found
			if p.top != nil && p.top.level < r.level {
				continue LOOP
			}
			p.top = r
		} else { // update chunk for epoch not found
			// if top level than return with no update found
			if r.level == 32 {
				close(p.cancel)
				return nil, nil
			}
			// if topmost epoch not found, then set bottom
			if p.bottom == nil || p.bottom.level < r.level {
				p.bottom = r
			}
		}

		// found - not found for two consecutive epochs
		if p.top != nil && p.bottom != nil && p.top.level == p.bottom.level+1 {
			// cancel path
			close(p.cancel)
			if p.bottom.isLeft() {
				return p.top.chunk, nil
			}
			// recursive call on new path through left sister
			np := newPath(at)
			np.top = &result{np, p.top.chunk, p.top.epoch}
			go f.at(ctx, int64(p.bottom.start-1), np, p.bottom.left(), c)
		}
	}
	return nil, nil
}
// At looks up the version valid at time `at`
// after is a unix time hint of the latest known update
At looks up the version valid at time `at`
after is a unix time hint of the latest known update
// At looks up the version valid at time ` at ` // after is a unix time hint of the latest known update
func (f *asyncFinder) asyncAt(ctx context.Context, at, after int64) (swarm.Chunk, error) {
	c := make(chan *result)
	go f.at(ctx, at, newPath(at), &epoch{0, maxLevel}, c)
LOOP:
	for r := range c {
		p := r.path
		select {
		case <-p.cancel:
			continue LOOP
		default:
		}
		if r.chunk != nil { 
			if r.level == 0 { 
				return r.chunk, nil
			}
			if p.top != nil && p.top.level < r.level {
				continue LOOP
			}
			p.top = r
		} else { 
			if r.level == 32 {
				close(p.cancel)
				return nil, nil
			}
			if p.bottom == nil || p.bottom.level < r.level {
				p.bottom = r
			}
		}
		if p.top != nil && p.bottom != nil && p.top.level == p.bottom.level+1 {
			close(p.cancel)
			if p.bottom.isLeft() {
				return p.top.chunk, nil
			}
			np := newPath(at)
			np.top = &result{np, p.top.chunk, p.top.epoch}
			go f.at(ctx, int64(p.bottom.start-1), np, p.bottom.left(), c)
		}
	}
	return nil, nil
}
func ( f * asyncFinder ) asyncAt ( ctx context . Context , at , after int64 ) ( swarm . Chunk , error ) { c := make ( chan * result ) go f . at ( ctx , at , newPath ( at ) , & epoch { 0 , maxLevel } , c ) LOOP : for r := range c { p := r . path select { case <- p . cancel : continue LOOP default : } if r . chunk != nil { if r . level == 0 { return r . chunk , nil } if p . top != nil && p . top . level < r . level { continue LOOP } p . top = r } else { if r . level == 32 { close ( p . cancel ) return nil , nil } if p . bottom == nil || p . bottom . level < r . level { p . bottom = r } } if p . top != nil && p . bottom != nil && p . top . level == p . bottom . level + 1 { close ( p . cancel ) if p . bottom . isLeft ( ) { return p . top . chunk , nil } np := newPath ( at ) np . top = & result { np , p . top . chunk , p . top . epoch } go f . at ( ctx , int64 ( p . bottom . start - 1 ) , np , p . bottom . left ( ) , c ) } } return nil , nil }
At looks up the version valid at time `at`
after is a unix time hint of the latest known update
At looks up the version valid at time ` at ` after is a unix time hint of the latest known update
// ignore result from paths already  cancelled // update chunk for epoch found // return if deepest level epoch // ignore if higher level than the deepest epoch found // update chunk for epoch not found // if top level than return with no update found // if topmost epoch not found, then set bottom // found - not found for two consecutive epochs // cancel path // recursive call on new path through left sister