From b64a5001635f7eefe91d9d90dfbf430a3906da7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Andr=C3=B3il?= Date: Mon, 28 Jul 2025 14:56:29 +0200 Subject: [PATCH] downloader: fix typos, grammar and formatting (#32288) --- eth/downloader/downloader.go | 8 ++++---- eth/downloader/downloader_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index dcda4e521c..09837a3045 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -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)) diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 669ce003cf..c1a31d6e1c 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -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: