mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
Update downloader.go
This commit is contained in:
parent
32d537cd58
commit
fec8bbc965
1 changed files with 4 additions and 4 deletions
|
|
@ -199,7 +199,7 @@ type BlockChain interface {
|
|||
// InsertChain inserts a batch of blocks into the local chain.
|
||||
InsertChain(types.Blocks) (int, error)
|
||||
|
||||
// InterruptInsert whether disables the chain insertion.
|
||||
// InterruptInsert disables or enables chain insertion.
|
||||
InterruptInsert(on bool)
|
||||
|
||||
// InsertReceiptChain inserts a batch of blocks along with their receipts
|
||||
|
|
@ -513,7 +513,7 @@ func (d *Downloader) syncToHead() (err error) {
|
|||
//
|
||||
// For non-merged networks, if there is a checkpoint available, then calculate
|
||||
// the ancientLimit through that. Otherwise calculate the ancient limit through
|
||||
// the advertised height of the remote peer. This most is mostly a fallback for
|
||||
// the advertised height of the remote peer. This is mostly a fallback for
|
||||
// legacy networks, but should eventually be dropped. TODO(karalabe).
|
||||
//
|
||||
// Beacon sync, use the latest finalized block as the ancient limit
|
||||
|
|
@ -946,7 +946,7 @@ func (d *Downloader) processSnapSyncContent() error {
|
|||
if !d.committed.Load() {
|
||||
latest := results[len(results)-1].Header
|
||||
// If the height is above the pivot block by 2 sets, it means the pivot
|
||||
// become stale in the network, and it was garbage collected, move to a
|
||||
// became stale in the network, and it was garbage collected, move to a
|
||||
// new pivot.
|
||||
//
|
||||
// Note, we have `reorgProtHeaderDelay` number of blocks withheld, Those
|
||||
|
|
@ -1043,7 +1043,7 @@ func (d *Downloader) commitSnapSyncData(results []*fetchResult, stateSync *state
|
|||
first, last := results[0].Header, results[len(results)-1].Header
|
||||
log.Debug("Inserting snap-sync blocks", "items", len(results),
|
||||
"firstnum", first.Number, "firsthash", first.Hash(),
|
||||
"lastnumn", last.Number, "lasthash", last.Hash(),
|
||||
"lastnum", last.Number, "lasthash", last.Hash(),
|
||||
)
|
||||
blocks := make([]*types.Block, len(results))
|
||||
receipts := make([]rlp.RawValue, len(results))
|
||||
|
|
|
|||
Loading…
Reference in a new issue