Skip to content

Commit 49217aa

Browse files
committed
Traverse batch result
1 parent cf79ee5 commit 49217aa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

rpc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ func (m *Monitor) rpcBatchBlockByNumber(from, to uint64) ([]*types.Block, error)
9898
return nil, err
9999
}
100100

101-
for i := range reqs {
102-
if reqs[i].Error != nil {
103-
return nil, reqs[i].Error
101+
for i, req := range reqs {
102+
if req.Error != nil {
103+
return nil, req.Error
104104
}
105105
if result[i] == nil {
106106
return nil, fmt.Errorf("got null block %d", i)

0 commit comments

Comments
 (0)