downloader: documentation

Co-Authored-By: holiman <martin@swende.se>
This commit is contained in:
Guillaume Ballet 2018-12-19 21:39:25 +01:00 committed by GitHub
parent 8519224d55
commit 9c4bf981eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1491,6 +1491,10 @@ func (d *Downloader) importBlockResults(results []*fetchResult) error {
if index < len(results) { if index < len(results) {
log.Debug("Downloaded item processing failed", "number", results[index].Header.Number, "hash", results[index].Header.Hash(), "err", err) log.Debug("Downloaded item processing failed", "number", results[index].Header.Number, "hash", results[index].Header.Hash(), "err", err)
} else { } else {
// The InsertChain method in blockchain.go will sometimes return an out-of-bounds index,
// when it needs to preprocess blocks to import a sidechain.
// The importer will put together a new list of blocks to import, which is a superset
// of the blocks delivered from the downloader, and the indexing will be off.
log.Debug("Downloaded item processing failed on sidechain import", "index", index, "err", err) log.Debug("Downloaded item processing failed on sidechain import", "index", index, "err", err)
} }
return errInvalidChain return errInvalidChain