Skip to content

Commit

Permalink
Fix typos in documentation and comments (#12905)
Browse files Browse the repository at this point in the history
## Changes

### erigon-lib/downloader/README.md
- `availible` -> `available`
  - Correct spelling of "available" in documentation
- `seperate` -> `separate` 
  - Correct spelling of "separate" in documentation
- `reather` -> `rather`
  - Correct spelling of "rather" in documentation

### erigon-lib/downloader/mdbx_piece_completion.go
- `intefere` -> `interfere`
  - Correct spelling of "interfere" in code comment


The changes fix typos and grammatical errors to improve code
documentation quality and readability. Having correct spelling and
grammar in documentation and comments helps other developers better
understand the codebase.

All changes are simple text corrections with no functional code changes.
  • Loading branch information
donatik27 authored Nov 29, 2024
1 parent d1954a6 commit 0e40f36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions erigon-lib/downloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The diagram below shows the components used to manage downloads between torrents

By default the downloader will try to use the underlying bittorrent library to download files from peers and web peers.

However this can result in slow or stalled downloads. When this happens [rclone](https://rclone.org/) can be used as an auxiliary process to aid the download process. When it is availible the download library will pass downloads to rclone under the following circumstances:
However this can result in slow or stalled downloads. When this happens [rclone](https://rclone.org/) can be used as an auxiliary process to aid the download process. When it is available the download library will pass downloads to rclone under the following circumstances:

* There are no torrent peers available for a file
* There is not torrent info available for a file, but a torrent file with a matching info hash can be found on the webseeds
Expand Down Expand Up @@ -43,13 +43,13 @@ the `well know` hash for a particular segment file in the following format.

Where multiple version of files exists there may be several likes per segment and the code in the released Erigon version will select the version that it is interesting.

As this file is versioned as part of the Erigon release process the file to hash mapping can potentially change between releases. This can potentially cause an issue for running Erigon node which expect the downloads in the snapshots directory to remain constant, which is why a seperate file is used to record the hases used by the process when it originally downloaded its files.
As this file is versioned as part of the Erigon release process the file to hash mapping can potentially change between releases. This can potentially cause an issue for running Erigon node which expect the downloads in the snapshots directory to remain constant, which is why a separate file is used to record the hases used by the process when it originally downloaded its files.

## snapshot-lock.json

This is a file which resides in the <data-dir>/snapshots directory for an Erigon node. It is created when the node performs its initial download. It contains the list of downloaded files and their respective hashes.

When a `snapshot-lock` file exists it is used reather than the chain.toml file to determine which files should be downloaded. This means that the directory contents can be maintained even if Erigon is re-versioned and the chain.toml contents change.
When a `snapshot-lock` file exists it is used rather than the chain.toml file to determine which files should be downloaded. This means that the directory contents can be maintained even if Erigon is re-versioned and the chain.toml contents change.

### Deleting snapshot-lock.json

Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/downloader/mdbx_piece_completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (m *mdbxPieceCompletion) Set(pk metainfo.PieceKey, b bool, awaitFlush bool)
}

// if we're awaiting flush update the DB immediately so it does not
// intefere with the timing of the background commit - may not be
// interfere with the timing of the background commit - may not be
// necessary - in which case the batch can be used
if awaitFlush {
return m.db.Update(context.Background(), func(tx kv.RwTx) error {
Expand Down

0 comments on commit 0e40f36

Please sign in to comment.