all: fix typos in comments (#21118)

This commit is contained in:
Martin Michlmayr 2020-05-25 16:21:28 +08:00 committed by GitHub
parent 48e3b95e77
commit 4f2784b38f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 65 additions and 65 deletions

@ -64,7 +64,7 @@ type SimulatedBackend struct {
mu sync.Mutex
pendingBlock *types.Block // Currently pending block that will be imported on request
pendingState *state.StateDB // Currently pending state that will be the active on on request
pendingState *state.StateDB // Currently pending state that will be the active on request
events *filters.EventSystem // Event system for filtering log events live

@ -49,7 +49,7 @@ type TransactOpts struct {
Nonce *big.Int // Nonce to use for the transaction execution (nil = use pending state)
Signer SignerFn // Method to use for signing the transaction (mandatory)
Value *big.Int // Funds to transfer along along the transaction (nil = 0 = no funds)
Value *big.Int // Funds to transfer along the transaction (nil = 0 = no funds)
GasPrice *big.Int // Gas price to use for the transaction execution (nil = gas price oracle)
GasLimit uint64 // Gas limit to set for the transaction execution (0 = estimate)

@ -64,7 +64,7 @@ type tmplField struct {
SolKind abi.Type // Raw abi type information
}
// tmplStruct is a wrapper around an abi.tuple contains a auto-generated
// tmplStruct is a wrapper around an abi.tuple contains an auto-generated
// struct name.
type tmplStruct struct {
Name string // Auto-generated struct name(before solidity v0.5.11) or raw name.

@ -98,7 +98,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
typ.Elem = &embeddedType
typ.stringKind = embeddedType.stringKind + sliced
} else if len(intz) == 1 {
// is a array
// is an array
typ.T = ArrayTy
typ.Elem = &embeddedType
typ.Size, err = strconv.Atoi(intz[0])

@ -167,7 +167,7 @@ func (api *ExternalSigner) SignData(account accounts.Account, mimeType string, d
hexutil.Encode(data)); err != nil {
return nil, err
}
// If V is on 27/28-form, convert to to 0/1 for Clique
// If V is on 27/28-form, convert to 0/1 for Clique
if mimeType == accounts.MimetypeClique && (res[64] == 27 || res[64] == 28) {
res[64] -= 27 // Transform V from 27/28 to 0/1 for Clique use
}

@ -61,7 +61,7 @@ func TestHDPathParsing(t *testing.T) {
// Weird inputs just to ensure they work
{" m / 44 '\n/\n 60 \n\n\t' /\n0 ' /\t\t 0", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0}},
// Invaid derivation paths
// Invalid derivation paths
{"", nil}, // Empty relative derivation path
{"m", nil}, // Empty absolute derivation path
{"m/", nil}, // Missing last derivation component

@ -220,7 +220,7 @@ func (hub *Hub) refreshWallets() {
// Mark the reader as present
seen[reader] = struct{}{}
// If we alreay know about this card, skip to the next reader, otherwise clean up
// If we already know about this card, skip to the next reader, otherwise clean up
if wallet, ok := hub.wallets[reader]; ok {
if err := wallet.ping(); err == nil {
continue

@ -362,7 +362,7 @@ func (w *Wallet) Open(passphrase string) error {
return err
}
// Pairing succeeded, fall through to PIN checks. This will of course fail,
// but we can't return ErrPINNeeded directly here becase we don't know whether
// but we can't return ErrPINNeeded directly here because we don't know whether
// a PIN check or a PIN reset is needed.
passphrase = ""
}

@ -9,7 +9,7 @@ Clef can run as a daemon on the same machine, off a usb-stick like [USB armory](
Check out the
* [CLI tutorial](tutorial.md) for some concrete examples on how Clef works.
* [Setup docs](docs/setup.md) for infos on how to configure Clef on QubesOS or USB Armory.
* [Setup docs](docs/setup.md) for information on how to configure Clef on QubesOS or USB Armory.
* [Data types](datatypes.md) for details on the communication messages between Clef and an external UI.
## Command line flags
@ -882,7 +882,7 @@ TLDR; Use this method to keep track of signed transactions, instead of using the
### OnSignerStartup / `ui_onSignerStartup`
This method provide the UI with information about what API version the signer uses (both internal and external) aswell as build-info and external API,
This method provide the UI with information about what API version the signer uses (both internal and external) as well as build-info and external API,
in k/v-form.
Example call:

@ -3,7 +3,7 @@
These data types are defined in the channel between clef and the UI
### SignDataRequest
SignDataRequest contains information about a pending request to sign some data. The data to be signed can be of various types, defined by content-type. Clef has done most of the work in canonicalizing and making sense of the data, and it's up to the UI to presentthe user with the contents of the `message`
SignDataRequest contains information about a pending request to sign some data. The data to be signed can be of various types, defined by content-type. Clef has done most of the work in canonicalizing and making sense of the data, and it's up to the UI to present the user with the contents of the `message`
Example:
```json

@ -186,7 +186,7 @@ from other qubes.
## USBArmory
The [USB armory](https://inversepath.com/usbarmory) is an open source hardware design with an 800 Mhz ARM processor. It is a pocket-size
The [USB armory](https://inversepath.com/usbarmory) is an open source hardware design with an 800 MHz ARM processor. It is a pocket-size
computer. When inserted into a laptop, it identifies itself as a USB network interface, basically adding another network
to your computer. Over this new network interface, you can SSH into the device.

@ -12,7 +12,7 @@ Additional labels for pre-release and build metadata are available as extensions
### 7.0.1
Added `clef_New` to the internal API calleable from a UI.
Added `clef_New` to the internal API callable from a UI.
> `New` creates a new password protected Account. The private key is protected with
> the given password. Users are responsible to backup the private key that is stored
@ -161,7 +161,7 @@ UserInputResponse struct {
#### 1.2.0
* Add `OnStartup` method, to provide the UI with information about what API version
the signer uses (both internal and external) aswell as build-info and external api.
the signer uses (both internal and external) as well as build-info and external api.
Example call:
```json

@ -73,7 +73,7 @@ at block: 0 ({{niltime}})
// Tests that a console can be attached to a running node via various means.
func TestIPCAttachWelcome(t *testing.T) {
// Configure the instance for IPC attachement
// Configure the instance for IPC attachment
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
var ipc string
if runtime.GOOS == "windows" {

@ -257,7 +257,7 @@ var dashboardContent = `
<p>Under the hood the Android library is backed by a go-ethereum light node, meaning that given a not-too-old Android device, you should be able to join the network without significant issues. Certain functionality is not yet available and rough edges are bound to appear here and there, please report issues if you find any.</p>
<br/>
<p>The stable Android archives are distributed via Maven Central, and the develop snapshots via the Sonatype repositories. Before proceeding, please ensure you have a recent version configured in your Android project. You can find details in <a href="https://github.com/ethereum/go-ethereum/wiki/Mobile:-Introduction#android-archive" target="about:blank">Mobile: Introduction &ndash; Android archive</a>.
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> genesis json file and either store it in your Android project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.</p>
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> genesis json file and either store it in your Android project as a resource file you can access, or save it as a string in a variable. You're going to need to initialize your client.</p>
<p>Inside your Java code you can now import the geth archive and connect to Ethereum:
<pre>import org.ethereum.geth.*;</pre>
<pre>
@ -288,7 +288,7 @@ node.start();
<p>Under the hood the iOS library is backed by a go-ethereum light node, meaning that given a not-too-old Apple device, you should be able to join the network without significant issues. Certain functionality is not yet available and rough edges are bound to appear here and there, please report issues if you find any.</p>
<br/>
<p>Both stable and develop builds of the iOS framework are available via CocoaPods. Before proceeding, please ensure you have a recent version configured in your iOS project. You can find details in <a href="https://github.com/ethereum/go-ethereum/wiki/Mobile:-Introduction#ios-framework" target="about:blank">Mobile: Introduction &ndash; iOS framework</a>.
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> genesis json file and either store it in your iOS project as a resource file you can access, or save it as a string in a variable. You're going to need to to initialize your client.</p>
<p>Before connecting to the Ethereum network, download the <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> genesis json file and either store it in your iOS project as a resource file you can access, or save it as a string in a variable. You're going to need to initialize your client.</p>
<p>Inside your Swift code you can now import the geth framework and connect to Ethereum (ObjC should be analogous):
<pre>import Geth</pre>
<pre>

@ -213,7 +213,7 @@ func checkFaucet(client *sshClient, network string) (*faucetInfos, error) {
minutes, _ := strconv.Atoi(infos.envvars["FAUCET_MINUTES"])
tiers, _ := strconv.Atoi(infos.envvars["FAUCET_TIERS"])
// Retrieve the funding account informations
// Retrieve the funding account information
var out []byte
keyJSON, keyPass := "", ""
if out, err = client.Run(fmt.Sprintf("docker exec %s_faucet_1 cat /account.json", network)); err == nil {

@ -99,7 +99,7 @@ func TestReimportMirroredState(t *testing.T) {
}
// Simulate a crash by creating a new chain on top of the database, without
// flushing the dirty states out. Insert the last block, trigerring a sidechain
// flushing the dirty states out. Insert the last block, triggering a sidechain
// reimport.
chain, _ = core.NewBlockChain(db, nil, params.AllCliqueProtocolChanges, engine, vm.Config{}, nil, nil)
defer chain.Stop()

@ -27,7 +27,7 @@ import (
)
var (
// ErrBadProDAOExtra is returned if a header doens't support the DAO fork on a
// ErrBadProDAOExtra is returned if a header doesn't support the DAO fork on a
// pro-fork client.
ErrBadProDAOExtra = errors.New("bad DAO pro-fork extra-data")

@ -1074,7 +1074,7 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [
size = 0
)
// updateHead updates the head fast sync block if the inserted blocks are better
// and returns a indicator whether the inserted blocks are canonical.
// and returns an indicator whether the inserted blocks are canonical.
updateHead := func(head *types.Block) bool {
bc.chainmu.Lock()

@ -1410,7 +1410,7 @@ func TestEIP161AccountRemoval(t *testing.T) {
t.Error("account should not exist")
}
// account musn't be created post eip 161
// account mustn't be created post eip 161
if _, err := blockchain.InsertChain(types.Blocks{blocks[2]}); err != nil {
t.Fatal(err)
}

@ -29,7 +29,7 @@ var (
ErrNoGenesis = errors.New("genesis not found in chain")
)
// List of evm-call-message pre-checking errors. All state transtion messages will
// List of evm-call-message pre-checking errors. All state transition messages will
// be pre-checked before execution. If any invalidation detected, the corresponding
// error should be returned which is defined here.
//

@ -125,7 +125,7 @@ func iterateTransactions(db ethdb.Database, from uint64, to uint64, reverse bool
}
}
}
// process runs in parallell
// process runs in parallel
nThreadsAlive := int32(threads)
process := func() {
defer func() {

@ -425,7 +425,7 @@ func (dl *diffLayer) Update(blockRoot common.Hash, destructs map[common.Hash]str
// flatten pushes all data from this point downwards, flattening everything into
// a single diff at the bottom. Since usually the lowermost diff is the largest,
// the flattening bulds up from there in reverse.
// the flattening builds up from there in reverse.
func (dl *diffLayer) flatten() snapshot {
// If the parent is not diff, we're the first in line, return unmodified
parent, ok := dl.parent.(*diffLayer)

@ -26,7 +26,7 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
)
// Iterator is a iterator to step over all the accounts or the specific
// Iterator is an iterator to step over all the accounts or the specific
// storage in a snapshot which may or may not be composed of multiple layers.
type Iterator interface {
// Next steps the iterator forward one element, returning false if exhausted,
@ -47,7 +47,7 @@ type Iterator interface {
Release()
}
// AccountIterator is a iterator to step over all the accounts in a snapshot,
// AccountIterator is an iterator to step over all the accounts in a snapshot,
// which may or may not be composed of multiple layers.
type AccountIterator interface {
Iterator
@ -57,7 +57,7 @@ type AccountIterator interface {
Account() []byte
}
// StorageIterator is a iterator to step over the specific storage in a snapshot,
// StorageIterator is an iterator to step over the specific storage in a snapshot,
// which may or may not be composed of multiple layers.
type StorageIterator interface {
Iterator
@ -250,7 +250,7 @@ type diffStorageIterator struct {
func (dl *diffLayer) StorageIterator(account common.Hash, seek common.Hash) (StorageIterator, bool) {
// Create the storage for this account even it's marked
// as destructed. The iterator is for the new one which
// just has the same adddress as the deleted one.
// just has the same address as the deleted one.
hashes, destructed := dl.StorageList(account)
index := sort.Search(len(hashes), func(i int) bool {
return bytes.Compare(seek[:], hashes[i][:]) <= 0

@ -238,7 +238,7 @@ func (fi *fastIterator) next(idx int) bool {
fi.iterators = append(fi.iterators[:idx], fi.iterators[idx+1:]...)
return len(fi.iterators) > 0
}
// If there's noone left to cascade into, return
// If there's no one left to cascade into, return
if idx == len(fi.iterators)-1 {
return true
}

@ -330,7 +330,7 @@ func (t *Tree) Cap(root common.Hash, layers int) error {
remove(root)
}
}
// If the disk layer was modified, regenerate all the cummulative blooms
// If the disk layer was modified, regenerate all the cumulative blooms
if persisted != nil {
var rebloom func(root common.Hash)
rebloom = func(root common.Hash) {

@ -94,7 +94,7 @@ func wipeKeyRange(db ethdb.KeyValueStore, kind string, prefix []byte, keylen int
it := db.NewIterator(prefix, nil)
for it.Next() {
// Skip any keys with the correct prefix but wrong lenth (trie nodes)
// Skip any keys with the correct prefix but wrong length (trie nodes)
key := it.Key()
if !bytes.HasPrefix(key, prefix) {
break

@ -71,7 +71,7 @@ var (
// maximum allowance of the current block.
ErrGasLimit = errors.New("exceeds block gas limit")
// ErrNegativeValue is a sanity error to ensure noone is able to specify a
// ErrNegativeValue is a sanity error to ensure no one is able to specify a
// transaction with a negative value.
ErrNegativeValue = errors.New("negative value")

@ -465,7 +465,7 @@ var (
)
func (c *blake2F) Run(input []byte) ([]byte, error) {
// Make sure the input is valid (correct lenth and final flag)
// Make sure the input is valid (correct length and final flag)
if len(input) != blake2FInputLength {
return nil, errBlake2FInvalidInputLength
}

@ -39,7 +39,7 @@ func callGas(isEip150 bool, availableGas, base uint64, callCost *big.Int) (uint6
availableGas = availableGas - base
gas := availableGas - availableGas/64
// If the bit length exceeds 64 bit we know that the newly calculated "gas" for EIP150
// is smaller than the requested amount. Therefor we return the new gas instead
// is smaller than the requested amount. Therefore we return the new gas instead
// of returning an error.
if !callCost.IsUint64() || gas < callCost.Uint64() {
return gas, nil

@ -724,7 +724,7 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header)
// If we're doing a light sync, ensure the floor doesn't go below the CHT, as
// all headers before that point will be missing.
if d.mode == LightSync {
// If we dont know the current CHT position, find it
// If we don't know the current CHT position, find it
if d.genesis == 0 {
header := d.lightchain.CurrentHeader()
for header != nil {
@ -1182,7 +1182,7 @@ func (d *Downloader) fetchReceipts(from uint64) error {
// - capacity: network callback to retrieve the estimated type-specific bandwidth capacity of a peer (traffic shaping)
// - idle: network callback to retrieve the currently (type specific) idle peers that can be assigned tasks
// - setIdle: network callback to set a peer back to idle and update its estimated capacity (traffic shaping)
// - kind: textual label of the type being downloaded to display in log mesages
// - kind: textual label of the type being downloaded to display in log messages
func (d *Downloader) fetchParts(deliveryCh chan dataPack, deliver func(dataPack) (int, error), wakeCh chan bool,
expire func() map[string]int, pending func() int, inFlight func() bool, throttle func() bool, reserve func(*peerConnection, int) (*fetchRequest, bool, error),
fetchHook func([]*types.Header), fetch func(*peerConnection, *fetchRequest) error, cancel func(*fetchRequest), capacity func(*peerConnection) int,

@ -1069,7 +1069,7 @@ func testInvalidHeaderRollback(t *testing.T, protocol int, mode SyncMode) {
}
}
// Tests that a peer advertising an high TD doesn't get to stall the downloader
// Tests that a peer advertising a high TD doesn't get to stall the downloader
// afterwards by not sending any useful hashes.
func TestHighTDStarvationAttack62(t *testing.T) { testHighTDStarvationAttack(t, 62, FullSync) }
func TestHighTDStarvationAttack63Full(t *testing.T) { testHighTDStarvationAttack(t, 63, FullSync) }

@ -155,7 +155,7 @@ func (p *peerConnection) FetchHeaders(from uint64, count int) error {
}
p.headerStarted = time.Now()
// Issue the header retrieval request (absolut upwards without gaps)
// Issue the header retrieval request (absolute upwards without gaps)
go p.peer.RequestHeadersByNumber(from, count, 0, false)
return nil

@ -515,7 +515,7 @@ func (f *TxFetcher) loop() {
// Schedule a new transaction retrieval
f.scheduleFetches(timeoutTimer, timeoutTrigger, nil)
// No idea if we sheduled something or not, trigger the timer if needed
// No idea if we scheduled something or not, trigger the timer if needed
// TODO(karalabe): this is kind of lame, can't we dump it into scheduleFetches somehow?
f.rescheduleTimeout(timeoutTimer, timeoutTrigger)

@ -30,7 +30,7 @@ import (
)
var (
// testTxs is a set of transactions to use during testing that have meaninful hashes.
// testTxs is a set of transactions to use during testing that have meaningful hashes.
testTxs = []*types.Transaction{
types.NewTransaction(5577006791947779410, common.Address{0x0f}, new(big.Int), 0, new(big.Int), nil),
types.NewTransaction(15352856648520921629, common.Address{0xbb}, new(big.Int), 0, new(big.Int), nil),
@ -449,7 +449,7 @@ func TestTransactionFetcherCleanupEmpty(t *testing.T) {
})
}
// Tests that non-returned transactions are either re-sheduled from a
// Tests that non-returned transactions are either re-scheduled from a
// different peer, or self if they are after the cutoff point.
func TestTransactionFetcherMissingRescheduling(t *testing.T) {
testTransactionFetcherParallel(t, txFetcherTest{

@ -237,7 +237,7 @@ func (cs *chainSyncer) nextSyncOp() *chainSyncOp {
return nil // Sync already running.
}
// Ensure we're at mininum peer count.
// Ensure we're at minimum peer count.
minPeers := defaultMinSyncPeers
if cs.forced {
minPeers = 1

@ -77,7 +77,7 @@ func (tt *TestCmd) Run(name string, args ...string) {
}
}
// InputLine writes the given text to the childs stdin.
// InputLine writes the given text to the child's stdin.
// This method can also be called from an expect template, e.g.:
//
// geth.expect(`Passphrase: {{.InputLine "password"}}`)

@ -287,7 +287,7 @@ func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error)
return common.Address{}, err
}
// fetchKeystore retrives the encrypted keystore from the account manager.
// fetchKeystore retrieves the encrypted keystore from the account manager.
func fetchKeystore(am *accounts.Manager) *keystore.KeyStore {
return am.Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
}

@ -3056,7 +3056,7 @@ ContractFactory.prototype.at = function (address, callback) {
var contract = new Contract(this.eth, this.abi, address);
// this functions are not part of prototype,
// because we dont want to spoil the interface
// because we don't want to spoil the interface
addFunctionsToContract(contract);
addEventsToContract(contract);
@ -13617,7 +13617,7 @@ module.exports = BigNumber; // jshint ignore:line
},{}],"web3":[function(require,module,exports){
var Web3 = require('./lib/web3');
// dont override global variable
// don't override global variable
if (typeof window !== 'undefined' && typeof window.Web3 === 'undefined') {
window.Web3 = Web3;
}

@ -585,7 +585,7 @@ func (f *clientPool) addBalance(id enode.ID, amount int64, meta string) (uint64,
if !c.priority && pb.value > 0 {
// The capacity should be adjusted based on the requirement,
// but we have no idea about the new capacity, need a second
// call to udpate it.
// call to update it.
c.priority = true
f.priorityConnected += c.capacity
c.balanceTracker.addCallback(balanceCallbackZero, 0, func() { f.balanceExhausted(id) })

@ -150,7 +150,7 @@ func (p *peerCommons) isFrozen() bool {
return atomic.LoadUint32(&p.frozen) != 0
}
// canQueue returns an indicator whether the peer can queue a operation.
// canQueue returns an indicator whether the peer can queue an operation.
func (p *peerCommons) canQueue() bool {
return p.sendQueue.CanQueue() && !p.isFrozen()
}

@ -65,7 +65,7 @@ This will output a log line that includes the path context that is attached to t
Handlers
The Handler interface defines where log lines are printed to and how they are formated. Handler is a
The Handler interface defines where log lines are printed to and how they are formatted. Handler is a
single interface that is inspired by net/http's handler interface:
type Handler interface {

@ -78,7 +78,7 @@ type TerminalStringer interface {
// a terminal with color-coded level output and terser human friendly timestamp.
// This format should only be used for interactive programs or while developing.
//
// [LEVEL] [TIME] MESAGE key=value key=value ...
// [LEVEL] [TIME] MESSAGE key=value key=value ...
//
// Example:
//

@ -117,7 +117,7 @@ func formatCall(format string, c stack.Call) string {
}
// CallerStackHandler returns a Handler that adds a stack trace to the context
// with key "stack". The stack trace is formated as a space separated list of
// with key "stack". The stack trace is formatted as a space separated list of
// call sites inside matching []'s. The most recent call site is listed first.
// Each call site is formatted according to format. See the documentation of
// package github.com/go-stack/stack for the list of supported formats.

@ -24,7 +24,7 @@
//
// Since gomobile cannot bridge arbitrary types between Go and Android/iOS, the
// exposed APIs need to be manually wrapped into simplified types, with custom
// constructors and getters/setters to ensure that they can be meaninfully used
// constructors and getters/setters to ensure that they can be meaningfully used
// from Java/ObjC too.
//
// With this in mind, please try to limit the scope of this package and only add

@ -352,7 +352,7 @@ func TestServiceStartupAbortion(t *testing.T) {
}
// Tests that even if a registered service fails to shut down cleanly, it does
// not influece the rest of the shutdown invocations.
// not influence the rest of the shutdown invocations.
func TestServiceTerminationGuarantee(t *testing.T) {
stack, err := New(testNodeConfig())
if err != nil {

@ -251,7 +251,7 @@ func (it *randomIterator) Next() bool {
return it.cur != nil
}
// addTree adds a enrtree:// URL to the iterator.
// addTree adds an enrtree:// URL to the iterator.
func (it *randomIterator) addTree(url string) error {
le, err := parseLink(url)
if err != nil {

@ -55,7 +55,7 @@ func TestSharedSecret(t *testing.T) {
}
t.Logf("Secret:\n%v %x\n%v %x", len(ss0), ss0, len(ss0), ss1)
if !bytes.Equal(ss0, ss1) {
t.Errorf("dont match :(")
t.Errorf("don't match :(")
}
}

@ -698,7 +698,7 @@ func (s *Server) JSON(w http.ResponseWriter, status int, data interface{}) {
json.NewEncoder(w).Encode(data)
}
// wrapHandler returns a httprouter.Handle which wraps a http.HandlerFunc by
// wrapHandler returns an httprouter.Handle which wraps an http.HandlerFunc by
// populating request.Context with any objects from the URL params
func (s *Server) wrapHandler(handler http.HandlerFunc) httprouter.Handle {
return func(w http.ResponseWriter, req *http.Request, params httprouter.Params) {

@ -56,6 +56,6 @@ const (
// ImmutabilityThreshold is the number of blocks after which a chain segment is
// considered immutable (i.e. soft finality). It is used by the downloader as a
// hard limit against deep ancestors, by the blockchain against deep reorgs, by
// the freezer as the cutoff treshold and by clique as the snapshot trust limit.
// the freezer as the cutoff threshold and by clique as the snapshot trust limit.
ImmutabilityThreshold = 90000
)

@ -36,7 +36,7 @@ const (
// OptionMethodInvocation is an indication that the codec supports RPC method calls
OptionMethodInvocation CodecOption = 1 << iota
// OptionSubscriptions is an indication that the codec suports RPC notifications
// OptionSubscriptions is an indication that the codec supports RPC notifications
OptionSubscriptions = 1 << iota // support pub sub
)

@ -98,7 +98,7 @@ func (t *Type) isReferenceType() bool {
if len(t.Type) == 0 {
return false
}
// Reference types must have a leading uppercase characer
// Reference types must have a leading uppercase character
return unicode.IsUpper([]rune(t.Type)[0])
}

@ -109,7 +109,7 @@ func (s *UIServerAPI) DeriveAccount(url string, path string, pin *bool) (account
return wallet.Derive(derivPath, *pin)
}
// fetchKeystore retrives the encrypted keystore from the account manager.
// fetchKeystore retrieves the encrypted keystore from the account manager.
func fetchKeystore(am *accounts.Manager) *keystore.KeyStore {
return am.Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
}

@ -34,7 +34,7 @@ go-fuzz -bin ./rlp/rlp-fuzz.zip
Once a 'crasher' is found, the fuzzer tries to avoid reporting the same vector twice, so stores the fault in the `suppressions` folder. Thus, if you
e.g. make changes to fix a bug, you should _remove_ all data from the `suppressions`-folder, to verify that the issue is indeed resolved.
Also, if you have only one and the same exit-point for multiple different types of test, the suppression can make the fuzzer hide differnent types of errors. So make
Also, if you have only one and the same exit-point for multiple different types of test, the suppression can make the fuzzer hide different types of errors. So make
sure that each type of failure is unique (for an example, see the rlp fuzzer, where a counter `i` is used to differentiate between failures:
```golang

@ -27,7 +27,7 @@ import (
)
// leafChanSize is the size of the leafCh. It's a pretty arbitrary number, to allow
// some paralellism but not incur too much memory overhead.
// some parallelism but not incur too much memory overhead.
const leafChanSize = 200
// leaf represents a trie leaf value
@ -41,7 +41,7 @@ type leaf struct {
// committer is a type used for the trie Commit operation. A committer has some
// internal preallocated temp space, and also a callback that is invoked when
// leaves are committed. The leafs are passed through the `leafCh`, to allow
// some level of paralellism.
// some level of parallelism.
// By 'some level' of parallelism, it's still the case that all leaves will be
// processed sequentially - onleaf will never be called in parallel or out of order.
type committer struct {

@ -399,7 +399,7 @@ func (db *Database) node(hash common.Hash) node {
// Node retrieves an encoded cached trie node from memory. If it cannot be found
// cached, the method queries the persistent database for the content.
func (db *Database) Node(hash common.Hash) ([]byte, error) {
// It doens't make sense to retrieve the metaroot
// It doesn't make sense to retrieve the metaroot
if hash == (common.Hash{}) {
return nil, errors.New("not found")
}