Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
tester.newPeer("peer 68", eth.ETH68, chain.blocks[1:])

if err := tester.downloader.BeaconSync(mode, chain.blocks[len(chain.blocks)-1].Header(), nil); err != nil {
t.Fatalf("failed to start beacon sync: #{err}")
t.Fatalf("failed to start beacon sync: %v", err)
}
select {
case <-complete:
Expand Down
Loading