Skip to content

Commit b64a500

Browse files
authored
downloader: fix typos, grammar and formatting (ethereum#32288)
1 parent 32d537c commit b64a500

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eth/downloader/downloader.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ type BlockChain interface {
199199
// InsertChain inserts a batch of blocks into the local chain.
200200
InsertChain(types.Blocks) (int, error)
201201

202-
// InterruptInsert whether disables the chain insertion.
202+
// InterruptInsert disables or enables chain insertion.
203203
InterruptInsert(on bool)
204204

205205
// InsertReceiptChain inserts a batch of blocks along with their receipts
@@ -513,7 +513,7 @@ func (d *Downloader) syncToHead() (err error) {
513513
//
514514
// For non-merged networks, if there is a checkpoint available, then calculate
515515
// the ancientLimit through that. Otherwise calculate the ancient limit through
516-
// the advertised height of the remote peer. This most is mostly a fallback for
516+
// the advertised height of the remote peer. This is mostly a fallback for
517517
// legacy networks, but should eventually be dropped. TODO(karalabe).
518518
//
519519
// Beacon sync, use the latest finalized block as the ancient limit
@@ -946,7 +946,7 @@ func (d *Downloader) processSnapSyncContent() error {
946946
if !d.committed.Load() {
947947
latest := results[len(results)-1].Header
948948
// If the height is above the pivot block by 2 sets, it means the pivot
949-
// become stale in the network, and it was garbage collected, move to a
949+
// became stale in the network, and it was garbage collected, move to a
950950
// new pivot.
951951
//
952952
// Note, we have `reorgProtHeaderDelay` number of blocks withheld, Those
@@ -1043,7 +1043,7 @@ func (d *Downloader) commitSnapSyncData(results []*fetchResult, stateSync *state
10431043
first, last := results[0].Header, results[len(results)-1].Header
10441044
log.Debug("Inserting snap-sync blocks", "items", len(results),
10451045
"firstnum", first.Number, "firsthash", first.Hash(),
1046-
"lastnumn", last.Number, "lasthash", last.Hash(),
1046+
"lastnum", last.Number, "lasthash", last.Hash(),
10471047
)
10481048
blocks := make([]*types.Block, len(results))
10491049
receipts := make([]rlp.RawValue, len(results))

eth/downloader/downloader_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
544544
tester.newPeer("peer 68", eth.ETH68, chain.blocks[1:])
545545

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

0 commit comments

Comments
 (0)