downloader: fix typos, grammar and formatting (#32288)

This commit is contained in:
Tomás Andróil 2025-07-28 14:56:29 +02:00 committed by GitHub
parent 32d537cd58
commit b64a500163
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -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))

View file

@ -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: