diff options
Diffstat (limited to 'eth/downloader')
-rw-r--r-- | eth/downloader/api.go | 2 | ||||
-rw-r--r-- | eth/downloader/downloader.go | 10 | ||||
-rw-r--r-- | eth/downloader/downloader_test.go | 6 | ||||
-rw-r--r-- | eth/downloader/queue.go | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/eth/downloader/api.go b/eth/downloader/api.go index 6df911fee..13d0ed46e 100644 --- a/eth/downloader/api.go +++ b/eth/downloader/api.go @@ -20,7 +20,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" ) -// PublicDownloaderAPI provides an API which gives informatoin about the current synchronisation status. +// PublicDownloaderAPI provides an API which gives information about the current synchronisation status. // It offers only methods that operates on data that can be available to anyone without security risks. type PublicDownloaderAPI struct { d *Downloader diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 143d8bde7..9fa82d486 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -197,7 +197,7 @@ func New(stateDb ethdb.Database, mux *event.TypeMux, hasHeader headerCheckFn, ha // block where synchronisation started at (may have failed/suspended); the block // or header sync is currently at; and the latest known block which the sync targets. // -// In addition, during the state download phase of fast synchonisation the number +// In addition, during the state download phase of fast synchronisation the number // of processed and the total number of known states are also returned. Otherwise // these are zero. func (d *Downloader) Progress() (uint64, uint64, uint64, uint64, uint64) { @@ -280,7 +280,7 @@ func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode // it will use the best peer possible and synchronize if it's TD is higher than our own. If any of the // checks fail an error will be returned. This method is synchronous func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int, mode SyncMode) error { - // Mock out the synchonisation if testing + // Mock out the synchronisation if testing if d.synchroniseMock != nil { return d.synchroniseMock(id, hash) } @@ -709,7 +709,7 @@ func (d *Downloader) fetchHashes61(p *peer, td *big.Int, from uint64) error { } // If no hashes were retrieved at all, the peer violated it's TD promise that it had a // better chain compared to ours. The only exception is if it's promised blocks were - // already imported by other means (e.g. fecher): + // already imported by other means (e.g. fetcher): // // R <remote peer>, L <local node>: Both at block 10 // R: Mine block 11, and propagate it to L @@ -1180,7 +1180,7 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { } // If no headers were retrieved at all, the peer violated it's TD promise that it had a // better chain compared to ours. The only exception is if it's promised blocks were - // already imported by other means (e.g. fecher): + // already imported by other means (e.g. fetcher): // // R <remote peer>, L <local node>: Both at block 10 // R: Mine block 11, and propagate it to L @@ -1621,7 +1621,7 @@ func (d *Downloader) DeliverBlocks(id string, blocks []*types.Block) (err error) return d.deliver(id, d.blockCh, &blockPack{id, blocks}, blockInMeter, blockDropMeter) } -// DeliverHeaders injects a new batch of blck headers received from a remote +// DeliverHeaders injects a new batch of block headers received from a remote // node into the download schedule. func (d *Downloader) DeliverHeaders(id string, headers []*types.Header) (err error) { return d.deliver(id, d.headerCh, &headerPack{id, headers}, headerInMeter, headerDropMeter) diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index ff57fe167..e66a90264 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -277,7 +277,7 @@ func (dl *downloadTester) insertHeaders(headers []*types.Header, checkFreq int) dl.lock.Lock() defer dl.lock.Unlock() - // Do a quick check, as the blockchain.InsertHeaderChain doesn't insert anthing in case of errors + // Do a quick check, as the blockchain.InsertHeaderChain doesn't insert anything in case of errors if _, ok := dl.ownHeaders[headers[0].ParentHash]; !ok { return 0, errors.New("unknown parent") } @@ -958,7 +958,7 @@ func testMultiSynchronisation(t *testing.T, protocol int, mode SyncMode) { } // Tests that synchronisations behave well in multi-version protocol environments -// and not wreak havok on other nodes in the network. +// and not wreak havoc on other nodes in the network. func TestMultiProtoSynchronisation61(t *testing.T) { testMultiProtoSync(t, 61, FullSync) } func TestMultiProtoSynchronisation62(t *testing.T) { testMultiProtoSync(t, 62, FullSync) } func TestMultiProtoSynchronisation63Full(t *testing.T) { testMultiProtoSync(t, 63, FullSync) } @@ -1188,7 +1188,7 @@ func testInvalidHeaderRollback(t *testing.T, protocol int, mode SyncMode) { // Synchronise with the valid peer and make sure sync succeeds. Since the last // rollback should also disable fast syncing for this process, verify that we // did a fresh full sync. Note, we can't assert anything about the receipts - // since we won't purge the database of them, hence we can't use asserOwnChain. + // since we won't purge the database of them, hence we can't use assertOwnChain. tester.newPeer("valid", protocol, hashes, headers, blocks, receipts) if err := tester.sync("valid", nil, mode); err != nil { t.Fatalf("failed to synchronise blocks: %v", err) diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index bc9428ecf..f86bae144 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -976,7 +976,7 @@ func (q *queue) DeliverNodeData(id string, data [][]byte, callback func(error, i accepted, errs := 0, make([]error, 0) process := []trie.SyncResult{} for _, blob := range data { - // Skip any state trie entires that were not requested + // Skip any state trie entries that were not requested hash := common.BytesToHash(crypto.Keccak256(blob)) if _, ok := request.Hashes[hash]; !ok { errs = append(errs, fmt.Errorf("non-requested state data %x", hash)) |