mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
downloader: fix typos, grammar and formatting (#32288)
This commit is contained in:
parent
32d537cd58
commit
b64a500163
2 changed files with 5 additions and 5 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))
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue