File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -131,28 +131,6 @@ func (it *insertIterator) next() (*types.Block, error) {
131131 return it .chain [it .index ], it .validator .ValidateBody (it .chain [it .index ])
132132}
133133
134- // peek returns the next block in the iterator, along with any potential validation
135- // error for that block, but does **not** advance the iterator.
136- //
137- // Both header and body validation errors (nil too) is cached into the iterator
138- // to avoid duplicating work on the following next() call.
139- // nolint:unused
140- func (it * insertIterator ) peek () (* types.Block , error ) {
141- // If we reached the end of the chain, abort
142- if it .index + 1 >= len (it .chain ) {
143- return nil , nil
144- }
145- // Wait for verification result if not yet done
146- if len (it .errors ) <= it .index + 1 {
147- it .errors = append (it .errors , <- it .results )
148- }
149- if it .errors [it .index + 1 ] != nil {
150- return it .chain [it .index + 1 ], it .errors [it .index + 1 ]
151- }
152- // Block header valid, ignore body validation since we don't have a parent anyway
153- return it .chain [it .index + 1 ], nil
154- }
155-
156134// previous returns the previous header that was being processed, or nil.
157135func (it * insertIterator ) previous () * types.Header {
158136 if it .index < 1 {
You can’t perform that action at this time.
0 commit comments