Skip to content

Commit

Permalink
add check of children before starting job
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Jan 27, 2023
1 parent 9371c5c commit e975f91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func (p *Peer) dagWorker(jobs chan *dagJob) {
job.node,
job.nodeGetter,
)

if err != nil {
log.ErrorE(
p.ctx,
Expand All @@ -146,6 +145,11 @@ func (p *Peer) dagWorker(jobs chan *dagJob) {
job.session.Done()
continue
}

if len(children) == 0 {
continue
}

go func(j *dagJob) {
p.handleChildBlocks(
j.session,
Expand Down

0 comments on commit e975f91

Please sign in to comment.