Skip to content

Commit

Permalink
Index out of bounds issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Kay-Zee committed Jan 26, 2021
1 parent ae8f357 commit a410dfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/access/rpc/backend/backend_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ func (b *backendEvents) getBlockEventsFromExecutionNode(
BlockIds: convert.IdentifiersToMessages(blockIDs),
}

if len(blockIDs) == 0 {
return []flow.BlockEvents{}, nil
}

// choose the last block ID to find the list of execution nodes
lastBlockID := blockIDs[len(blockIDs)-1]

Expand Down

0 comments on commit a410dfe

Please sign in to comment.