From 18c77744ff4ad0bc385a4c8b50d28c2a6fde8e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 6 Jan 2017 19:44:35 +0200 Subject: [PATCH] all: fix spelling errors --- build/update-license.go | 2 +- cmd/swarm/main.go | 2 +- console/bridge.go | 8 +++---- console/prompter.go | 4 ++-- contracts/chequebook/cheque.go | 4 ++-- contracts/release/contract.sol | 4 ++-- core/state/statedb.go | 2 +- core/tx_list.go | 2 +- core/tx_pool.go | 2 +- core/vm/environment.go | 8 +++---- crypto/crypto.go | 4 ++-- crypto/ecies/ecies.go | 2 +- .../libsecp256k1/include/secp256k1_schnorr.h | 4 ++-- crypto/secp256k1/notes.go | 2 +- crypto/secp256k1/secp256.go | 2 +- eth/api.go | 2 +- eth/downloader/downloader.go | 2 +- eth/filters/filter_system.go | 2 +- eth/filters/filter_system_test.go | 2 +- eth/handler_test.go | 2 +- eth/protocol_test.go | 2 +- internal/ethapi/api.go | 6 ++--- internal/jsre/ethereum_js.go | 22 +++++++++---------- les/metrics.go | 2 +- miner/worker.go | 2 +- node/node_example_test.go | 2 +- p2p/discover/udp_test.go | 2 +- p2p/discv5/udp_test.go | 2 +- params/protocol_params.go | 2 +- rpc/subscription.go | 2 +- rpc/subscription_test.go | 2 +- rpc/types.go | 2 +- swarm/storage/netstore.go | 2 +- swarm/storage/types.go | 2 +- .../TestNetwork/bcTheDaoTest.json | 6 ++--- .../ansible/test-files/docker-cpp/Dockerfile | 2 +- .../test-files/docker-cppjit/Dockerfile | 2 +- tests/vm_test_util.go | 2 +- trie/hasher.go | 2 +- whisper/whisperv5/doc.go | 2 +- 40 files changed, 65 insertions(+), 65 deletions(-) diff --git a/build/update-license.go b/build/update-license.go index e0c273def..f3335b119 100644 --- a/build/update-license.go +++ b/build/update-license.go @@ -294,7 +294,7 @@ func getInfo(files <-chan string, out chan<- *info, wg *sync.WaitGroup) { wg.Done() } -// fileInfo finds the lowest year in which the given file was commited. +// fileInfo finds the lowest year in which the given file was committed. func fileInfo(file string) (*info, error) { info := &info{file: file, Year: int64(time.Now().Year())} cmd := exec.Command("git", "log", "--follow", "--find-renames=80", "--find-copies=80", "--pretty=format:%ai", "--", file) diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 71f53082a..87e21fb7f 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -114,7 +114,7 @@ var ( } CorsStringFlag = cli.StringFlag{ Name: "corsdomain", - Usage: "Domain on which to send Access-Control-Allow-Origin header (multiple domains can be supplied seperated by a ',')", + Usage: "Domain on which to send Access-Control-Allow-Origin header (multiple domains can be supplied separated by a ',')", } ) diff --git a/console/bridge.go b/console/bridge.go index 7f7e6feb1..1c5bc8419 100644 --- a/console/bridge.go +++ b/console/bridge.go @@ -46,7 +46,7 @@ func newBridge(client *rpc.Client, prompter UserPrompter, printer io.Writer) *br } // NewAccount is a wrapper around the personal.newAccount RPC method that uses a -// non-echoing password prompt to aquire the passphrase and executes the original +// non-echoing password prompt to acquire the passphrase and executes the original // RPC method (saved in jeth.newAccount) with it to actually execute the RPC call. func (b *bridge) NewAccount(call otto.FunctionCall) (response otto.Value) { var ( @@ -75,7 +75,7 @@ func (b *bridge) NewAccount(call otto.FunctionCall) (response otto.Value) { default: throwJSException("expected 0 or 1 string argument") } - // Password aquired, execute the call and return + // Password acquired, execute the call and return ret, err := call.Otto.Call("jeth.newAccount", nil, password) if err != nil { throwJSException(err.Error()) @@ -84,7 +84,7 @@ func (b *bridge) NewAccount(call otto.FunctionCall) (response otto.Value) { } // UnlockAccount is a wrapper around the personal.unlockAccount RPC method that -// uses a non-echoing password prompt to aquire the passphrase and executes the +// uses a non-echoing password prompt to acquire the passphrase and executes the // original RPC method (saved in jeth.unlockAccount) with it to actually execute // the RPC call. func (b *bridge) UnlockAccount(call otto.FunctionCall) (response otto.Value) { @@ -127,7 +127,7 @@ func (b *bridge) UnlockAccount(call otto.FunctionCall) (response otto.Value) { } // Sign is a wrapper around the personal.sign RPC method that uses a non-echoing password -// prompt to aquire the passphrase and executes the original RPC method (saved in +// prompt to acquire the passphrase and executes the original RPC method (saved in // jeth.sign) with it to actually execute the RPC call. func (b *bridge) Sign(call otto.FunctionCall) (response otto.Value) { var ( diff --git a/console/prompter.go b/console/prompter.go index 5946d9ece..6acbfb0e2 100644 --- a/console/prompter.go +++ b/console/prompter.go @@ -44,7 +44,7 @@ type UserPrompter interface { PromptConfirm(prompt string) (bool, error) // SetHistory sets the the input scrollback history that the prompter will allow - // the user to scoll back to. + // the user to scroll back to. SetHistory(history []string) // AppendHistory appends an entry to the scrollback history. It should be called @@ -147,7 +147,7 @@ func (p *terminalPrompter) PromptConfirm(prompt string) (bool, error) { } // SetHistory sets the the input scrollback history that the prompter will allow -// the user to scoll back to. +// the user to scroll back to. func (p *terminalPrompter) SetHistory(history []string) { p.State.ReadHistory(strings.NewReader(strings.Join(history, "\n"))) } diff --git a/contracts/chequebook/cheque.go b/contracts/chequebook/cheque.go index 5ece1391b..d49964f91 100644 --- a/contracts/chequebook/cheque.go +++ b/contracts/chequebook/cheque.go @@ -252,7 +252,7 @@ func (self *Chequebook) Issue(beneficiary common.Address, amount *big.Int) (ch * return nil, fmt.Errorf("amount must be greater than zero (%v)", amount) } if self.balance.Cmp(amount) < 0 { - err = fmt.Errorf("insufficent funds to issue cheque for amount: %v. balance: %v", amount, self.balance) + err = fmt.Errorf("insufficient funds to issue cheque for amount: %v. balance: %v", amount, self.balance) } else { var sig []byte sent, found := self.sent[beneficiary] @@ -277,7 +277,7 @@ func (self *Chequebook) Issue(beneficiary common.Address, amount *big.Int) (ch * } // auto deposit if threshold is set and balance is less then threshold - // note this is called even if issueing cheque fails + // note this is called even if issuing cheque fails // so we reattempt depositing if self.threshold != nil { if self.balance.Cmp(self.threshold) < 0 { diff --git a/contracts/release/contract.sol b/contracts/release/contract.sol index fedf646c0..554cf7290 100644 --- a/contracts/release/contract.sol +++ b/contracts/release/contract.sol @@ -78,7 +78,7 @@ contract ReleaseOracle { } // signers is an accessor method to retrieve all te signers (public accessor - // generates an indexed one, not a retreive-all version). + // generates an indexed one, not a retrieve-all version). function signers() constant returns(address[]) { return voters; } @@ -178,7 +178,7 @@ contract ReleaseOracle { voters[i] = voters[voters.length - 1]; voters.length--; - delete verProp; // Nuke any version proposal (no suprise releases!) + delete verProp; // Nuke any version proposal (no surprise releases!) break; } } diff --git a/core/state/statedb.go b/core/state/statedb.go index 75c40b364..063e2b469 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -210,7 +210,7 @@ func (self *StateDB) Exist(addr common.Address) bool { return self.GetStateObject(addr) != nil } -// Empty returns whether the state object is either non-existant +// Empty returns whether the state object is either non-existent // or empty according to the EIP161 specification (balance = nonce = code = 0) func (self *StateDB) Empty(addr common.Address) bool { so := self.GetStateObject(addr) diff --git a/core/tx_list.go b/core/tx_list.go index 95831c83b..535cb9dd6 100644 --- a/core/tx_list.go +++ b/core/tx_list.go @@ -216,7 +216,7 @@ func (m *txSortedMap) Flatten() types.Transactions { // txList is a "list" of transactions belonging to an account, sorted by account // nonce. The same type can be used both for storing contiguous transactions for // the executable/pending queue; and for storing gapped transactions for the non- -// executable/future queue, with minor behavoiral changes. +// executable/future queue, with minor behavioral changes. type txList struct { strict bool // Whether nonces are strictly continuous or not txs *txSortedMap // Heap indexed sorted hash map of the transactions diff --git a/core/tx_pool.go b/core/tx_pool.go index 2e1e5c63e..58922f12f 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -321,7 +321,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction) error { // add validates a transaction and inserts it into the non-executable queue for // later pending promotion and execution. func (pool *TxPool) add(tx *types.Transaction) error { - // If the transaction is alreayd known, discard it + // If the transaction is already known, discard it hash := tx.Hash() if pool.all[hash] != nil { return fmt.Errorf("Known transaction: %x", hash[:4]) diff --git a/core/vm/environment.go b/core/vm/environment.go index b74b3a795..c19ef464b 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -34,7 +34,7 @@ type ( GetHashFunc func(uint64) common.Hash ) -// Context provides the EVM with auxilary information. Once provided it shouldn't be modified. +// Context provides the EVM with auxiliary information. Once provided it shouldn't be modified. type Context struct { // CanTransfer returns whether the account contains // sufficient ether to transfer the value @@ -99,7 +99,7 @@ func (evm *EVM) Cancel() { atomic.StoreInt32(&evm.abort, 1) } -// Call executes the contract associated with the addr with the given input as paramaters. It also handles any +// Call executes the contract associated with the addr with the given input as parameters. It also handles any // necessary value transfer required and takes the necessary steps to create accounts and reverses the state in // case of an execution error or failed value transfer. func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas, value *big.Int) (ret []byte, err error) { @@ -157,7 +157,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas, return ret, err } -// CallCode executes the contract associated with the addr with the given input as paramaters. It also handles any +// CallCode executes the contract associated with the addr with the given input as parameters. It also handles any // necessary value transfer required and takes the necessary steps to create accounts and reverses the state in // case of an execution error or failed value transfer. // @@ -203,7 +203,7 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, return ret, err } -// DelegateCall executes the contract associated with the addr with the given input as paramaters. +// DelegateCall executes the contract associated with the addr with the given input as parameters. // It reverses the state in case of an execution error. // // DelegateCall differs from CallCode in the sense that it executes the given address' code with the caller as context diff --git a/crypto/crypto.go b/crypto/crypto.go index f1a4b774c..ce45ebd38 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -194,9 +194,9 @@ func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) { // Sign calculates an ECDSA signature. // -// This function is susceptible to choosen plaintext attacks that can leak +// This function is susceptible to chosen plaintext attacks that can leak // information about the private key that is used for signing. Callers must -// be aware that the given hash cannot be choosen by an adversery. Common +// be aware that the given hash cannot be chosen by an adversery. Common // solution is to hash any input before calculating the signature. // // The produced signature is in the [R || S || V] format where V is 0 or 1. diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go index b1a716c00..2a16f20a2 100644 --- a/crypto/ecies/ecies.go +++ b/crypto/ecies/ecies.go @@ -93,7 +93,7 @@ func ImportECDSA(prv *ecdsa.PrivateKey) *PrivateKey { } // Generate an elliptic curve public / private keypair. If params is nil, -// the recommended default paramters for the key will be chosen. +// the recommended default parameters for the key will be chosen. func GenerateKey(rand io.Reader, curve elliptic.Curve, params *ECIESParams) (prv *PrivateKey, err error) { pb, x, y, err := elliptic.GenerateKey(curve, rand) if err != nil { diff --git a/crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h b/crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h index 49354933d..9b4f5b607 100644 --- a/crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h +++ b/crypto/secp256k1/libsecp256k1/include/secp256k1_schnorr.h @@ -99,7 +99,7 @@ SECP256K1_API int secp256k1_schnorr_generate_nonce_pair( /** Produce a partial Schnorr signature, which can be combined using * secp256k1_schnorr_partial_combine, to end up with a full signature that is * verifiable using secp256k1_schnorr_verify. - * Returns: 1: signature created succesfully. + * Returns: 1: signature created successfully. * 0: no valid signature exists with this combination of keys, nonces * and message (chance around 1 in 2^128) * -1: invalid private key, nonce, or public nonces. @@ -148,7 +148,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_partial_sign( ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(6); /** Combine multiple Schnorr partial signatures. - * Returns: 1: the passed signatures were succesfully combined. + * Returns: 1: the passed signatures were successfully combined. * 0: the resulting signature is not valid (chance of 1 in 2^256) * -1: some inputs were invalid, or the signatures were not created * using the same set of nonces diff --git a/crypto/secp256k1/notes.go b/crypto/secp256k1/notes.go index 93e6d1902..49fcf8e2d 100644 --- a/crypto/secp256k1/notes.go +++ b/crypto/secp256k1/notes.go @@ -163,7 +163,7 @@ int secp256k1_ecdsa_sign_compact(const unsigned char *msg, int msglen, int *recid); * Recover an ECDSA public key from a compact signature. - * Returns: 1: public key succesfully recovered (which guarantees a correct signature). + * Returns: 1: public key successfully recovered (which guarantees a correct signature). * 0: otherwise. * In: msg: the message assumed to be signed * msglen: the length of the message diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go index 4999c5c95..2c5f61450 100644 --- a/crypto/secp256k1/secp256.go +++ b/crypto/secp256k1/secp256.go @@ -49,7 +49,7 @@ import ( /* TODO: - > store private keys in buffer and shuffle (deters persistance on swap disc) + > store private keys in buffer and shuffle (deters persistence on swap disc) > byte permutation (changing) > xor with chaning random block (to deter scanning memory for 0x63) (stream cipher?) */ diff --git a/eth/api.go b/eth/api.go index f077e348c..d798c196e 100644 --- a/eth/api.go +++ b/eth/api.go @@ -435,7 +435,7 @@ func (api *PrivateDebugAPI) traceBlock(block *types.Block, logConfig *vm.LogConf return true, structLogger.StructLogs(), nil } -// callmsg is the message type used for call transations. +// callmsg is the message type used for call transitions. type callmsg struct { addr common.Address to *common.Address diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index b1f4b8169..9be4bd87d 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1005,7 +1005,7 @@ func (d *Downloader) fetchNodeData() error { // - fetchHook: tester callback to notify of new tasks being initiated (allows testing the scheduling logic) // - fetch: network callback to actually send a particular download request to a physical remote peer // - cancel: task callback to abort an in-flight download request and allow rescheduling it (in case of lost peer) -// - capacity: network callback to retreive the estimated type-specific bandwidth capacity of a peer (traffic shaping) +// - 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 diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go index 7493dd231..e0ee2ff51 100644 --- a/eth/filters/filter_system.go +++ b/eth/filters/filter_system.go @@ -37,7 +37,7 @@ import ( type Type byte const ( - // UnknownSubscription indicates an unkown subscription type + // UnknownSubscription indicates an unknown subscription type UnknownSubscription Type = iota // LogsSubscription queries for new or removed (chain reorg) logs LogsSubscription diff --git a/eth/filters/filter_system_test.go b/eth/filters/filter_system_test.go index cd0745ec1..1cfced7e4 100644 --- a/eth/filters/filter_system_test.go +++ b/eth/filters/filter_system_test.go @@ -411,7 +411,7 @@ func TestPendingLogsSubscription(t *testing.T) { {FilterCriteria{Addresses: []common.Address{thirdAddress}, Topics: [][]common.Hash{{firstTopic, secondTopic}}}, append(convertLogs(allLogs[3:5]), allLogs[5].Logs[0]), nil, nil}, // match logs based on multiple addresses and "or" topics {FilterCriteria{Addresses: []common.Address{secondAddr, thirdAddress}, Topics: [][]common.Hash{{firstTopic, secondTopic}}}, append(convertLogs(allLogs[2:5]), allLogs[5].Logs[0]), nil, nil}, - // block numbers are ignored for filters created with New***Filter, these return all logs that match the given criterias when the state changes + // block numbers are ignored for filters created with New***Filter, these return all logs that match the given criteria when the state changes {FilterCriteria{Addresses: []common.Address{firstAddr}, FromBlock: big.NewInt(2), ToBlock: big.NewInt(3)}, append(convertLogs(allLogs[:2]), allLogs[5].Logs[3]), nil, nil}, // multiple pending logs, should match only 2 topics from the logs in block 5 {FilterCriteria{Addresses: []common.Address{thirdAddress}, Topics: [][]common.Hash{{firstTopic, forthTopic}}}, []*types.Log{allLogs[5].Logs[0], allLogs[5].Logs[2]}, nil, nil}, diff --git a/eth/handler_test.go b/eth/handler_test.go index 4695b3f60..22a4ddf50 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -491,7 +491,7 @@ func testDAOChallenge(t *testing.T, localForked, remoteForked bool, timeout bool if err := p2p.ExpectMsg(peer.app, GetBlockHeadersMsg, challenge); err != nil { t.Fatalf("challenge mismatch: %v", err) } - // Create a block to reply to the challenge if no timeout is simualted + // Create a block to reply to the challenge if no timeout is simulated if !timeout { blocks, _ := core.GenerateChain(¶ms.ChainConfig{}, genesis, db, 1, func(i int, block *core.BlockGen) { if remoteForked { diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 43149d0c0..3b8056433 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -82,7 +82,7 @@ func testStatusMsgErrors(t *testing.T, protocol int) { t.Errorf("test %d: wrong error: got %q, want %q", i, err, test.wantError) } case <-time.After(2 * time.Second): - t.Errorf("protocol did not shut down withing 2 seconds") + t.Errorf("protocol did not shut down within 2 seconds") } p.close() } diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 4b9ce068f..7ea216029 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -470,7 +470,7 @@ func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.A return res.Hex(), nil } -// callmsg is the message type used for call transations. +// callmsg is the message type used for call transitions. type callmsg struct { addr common.Address to *common.Address @@ -541,14 +541,14 @@ func (s *PublicBlockChainAPI) doCall(ctx context.Context, args CallArgs, blockNr if err := vmError(); err != nil { return "0x", common.Big0, err } - if len(res) == 0 { // backwards compatability + if len(res) == 0 { // backwards compatibility return "0x", gas, err } return common.ToHex(res), gas, err } // Call executes the given transaction on the state for the given block number. -// It doesn't make and changes in the state/blockchain and is usefull to execute and retrieve values. +// It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values. func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (string, error) { result, _, err := s.doCall(ctx, args, blockNr) return result, err diff --git a/internal/jsre/ethereum_js.go b/internal/jsre/ethereum_js.go index b4eef194c..e1cee8650 100644 --- a/internal/jsre/ethereum_js.go +++ b/internal/jsre/ethereum_js.go @@ -2278,7 +2278,7 @@ var toTwosComplement = function (number) { * Checks if the given string is strictly an address * * @method isStrictAddress - * @param {String} address the given HEX adress + * @param {String} address the given HEX address * @return {Boolean} */ var isStrictAddress = function (address) { @@ -2289,7 +2289,7 @@ var isStrictAddress = function (address) { * Checks if the given string is an address * * @method isAddress - * @param {String} address the given HEX adress + * @param {String} address the given HEX address * @return {Boolean} */ var isAddress = function (address) { @@ -2311,7 +2311,7 @@ var isAddress = function (address) { * Checks if the given string is a checksummed address * * @method isChecksumAddress - * @param {String} address the given HEX adress + * @param {String} address the given HEX address * @return {Boolean} */ var isChecksumAddress = function (address) { @@ -2334,7 +2334,7 @@ var isChecksumAddress = function (address) { * Makes a checksum address * * @method toChecksumAddress - * @param {String} address the given HEX adress + * @param {String} address the given HEX address * @return {String} */ var toChecksumAddress = function (address) { @@ -2356,7 +2356,7 @@ var toChecksumAddress = function (address) { }; /** - * Transforms given string to valid 20 bytes-length addres with 0x prefix + * Transforms given string to valid 20 bytes-length address with 0x prefix * * @method toAddress * @param {String} address @@ -3000,7 +3000,7 @@ var ContractFactory = function (eth, abi) { if (callback) { - // wait for the contract address adn check if the code was deployed + // wait for the contract address and check if the code was deployed this.eth.sendTransaction(options, function (err, hash) { if (err) { callback(err); @@ -3480,7 +3480,7 @@ Adds the callback and sets up the methods, to iterate over the results. @method getLogsAtStart @param {Object} self -@param {funciton} +@param {function} */ var getLogsAtStart = function(self, callback){ // call getFilterLogs for the first watch callback start @@ -6429,7 +6429,7 @@ var transferToAddress = function (eth, from, to, value, callback) { * @method deposit * @param {String} from * @param {String} to - * @param {Value} value to be transfered + * @param {Value} value to be transferred * @param {String} client unique identifier * @param {Function} callback, callback */ @@ -13381,10 +13381,10 @@ module.exports = transfer; * equivalent to (a % n) in JavaScript. * FLOOR 3 The remainder has the same sign as the divisor (Python %). * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. - * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). + * EUCLID 9 Euclidean division. q = sign(n) * floor(a / abs(n)). * The remainder is always positive. * - * The truncated division, floored division, Euclidian division and IEEE 754 remainder + * The truncated division, floored division, Euclidean division and IEEE 754 remainder * modes are commonly used for the modulus operation. * Although the other rounding modes can also be used, they may not give useful results. */ @@ -15002,7 +15002,7 @@ module.exports = transfer; if ( MODULO_MODE == 9 ) { - // Euclidian division: q = sign(y) * floor(x / abs(y)) + // Euclidean division: q = sign(y) * floor(x / abs(y)) // r = x - qy where 0 <= r < abs(y) s = y.s; y.s = 1; diff --git a/les/metrics.go b/les/metrics.go index aa0796790..0162a1d1a 100644 --- a/les/metrics.go +++ b/les/metrics.go @@ -72,7 +72,7 @@ type meteredMsgReadWriter struct { } // newMeteredMsgWriter wraps a p2p MsgReadWriter with metering support. If the -// metrics system is disabled, this fucntion returns the original object. +// metrics system is disabled, this function returns the original object. func newMeteredMsgWriter(rw p2p.MsgReadWriter) p2p.MsgReadWriter { if !metrics.Enabled { return rw diff --git a/miner/worker.go b/miner/worker.go index 56fd4ea66..77e4e0205 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -492,7 +492,7 @@ func (self *worker) commitNewWork() { } badUncles = append(badUncles, hash) } else { - glog.V(logger.Debug).Infof("commiting %x as uncle\n", hash[:4]) + glog.V(logger.Debug).Infof("committing %x as uncle\n", hash[:4]) uncles = append(uncles, uncle.Header()) } } diff --git a/node/node_example_test.go b/node/node_example_test.go index 01ff683c0..7c586452f 100644 --- a/node/node_example_test.go +++ b/node/node_example_test.go @@ -44,7 +44,7 @@ func (s *SampleService) Stop() error { fmt.Println("Service stoppi func ExampleUsage() { // Create a network node to run protocols with the default values. The below list // is only used to display each of the configuration options. All of these could - // have been ommited if the default behavior is desired. + // have been omitted if the default behavior is desired. nodeConfig := &node.Config{ DataDir: "", // Empty uses ephemeral storage PrivateKey: nil, // Nil generates a node key on the fly diff --git a/p2p/discover/udp_test.go b/p2p/discover/udp_test.go index 8bca37ffe..21e8b561d 100644 --- a/p2p/discover/udp_test.go +++ b/p2p/discover/udp_test.go @@ -234,7 +234,7 @@ func TestUDP_findnode(t *testing.T) { defer test.table.Close() // put a few nodes into the table. their exact - // distribution shouldn't matter much, altough we need to + // distribution shouldn't matter much, although we need to // take care not to overflow any bucket. targetHash := crypto.Keccak256Hash(testTarget[:]) nodes := &nodesByDistance{target: targetHash} diff --git a/p2p/discv5/udp_test.go b/p2p/discv5/udp_test.go index 98c737669..7d3181594 100644 --- a/p2p/discv5/udp_test.go +++ b/p2p/discv5/udp_test.go @@ -126,7 +126,7 @@ var ( // defer test.table.Close() // // // put a few nodes into the table. their exact -// // distribution shouldn't matter much, altough we need to +// // distribution shouldn't matter much, although we need to // // take care not to overflow any bucket. // targetHash := crypto.Keccak256Hash(testTarget[:]) // nodes := &nodesByDistance{target: targetHash} diff --git a/params/protocol_params.go b/params/protocol_params.go index e98925c2b..f5b6bedeb 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -58,7 +58,7 @@ var ( Ripemd160WordGas = big.NewInt(120) // MinimumDifficulty = big.NewInt(131072) // The minimum that the difficulty may ever be. CallCreateDepth = big.NewInt(1024) // Maximum depth of call/create stack. - ExpGas = big.NewInt(10) // Once per EXP instuction. + ExpGas = big.NewInt(10) // Once per EXP instruction. LogGas = big.NewInt(375) // Per LOG* operation. CopyGas = big.NewInt(3) // StackLimit = big.NewInt(1024) // Maximum size of VM stack allowed. diff --git a/rpc/subscription.go b/rpc/subscription.go index 863d34b20..bcdc3cdfc 100644 --- a/rpc/subscription.go +++ b/rpc/subscription.go @@ -30,7 +30,7 @@ var ( ErrSubscriptionNotFound = errors.New("subscription not found") ) -// ID defines a psuedo random number that is used to identify RPC subscriptions. +// ID defines a pseudo random number that is used to identify RPC subscriptions. type ID string // a Subscription is created by a notifier and tight to that notifier. The client can use diff --git a/rpc/subscription_test.go b/rpc/subscription_test.go index 8bb341694..97f2c0d65 100644 --- a/rpc/subscription_test.go +++ b/rpc/subscription_test.go @@ -62,7 +62,7 @@ func (s *NotificationTestService) SomeSubscription(ctx context.Context, n, val i subscription := notifier.CreateSubscription() go func() { - // test expects n events, if we begin sending event immediatly some events + // test expects n events, if we begin sending event immediately some events // will probably be dropped since the subscription ID might not be send to // the client. time.Sleep(5 * time.Second) diff --git a/rpc/types.go b/rpc/types.go index 01b95a170..d8d736efb 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -135,7 +135,7 @@ const ( LatestBlockNumber = BlockNumber(-1) ) -// UnmarshalJSON parses the given JSON fragement into a BlockNumber. It supports: +// UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports: // - "latest", "earliest" or "pending" as string arguments // - the block number // Returned errors: diff --git a/swarm/storage/netstore.go b/swarm/storage/netstore.go index 334229aed..f97862bbb 100644 --- a/swarm/storage/netstore.go +++ b/swarm/storage/netstore.go @@ -99,7 +99,7 @@ func (self *NetStore) Put(entry *Chunk) { // handle deliveries if entry.Req != nil { glog.V(logger.Detail).Infof("NetStore.Put: localStore.Put %v hit existing request...delivering", entry.Key.Log()) - // closing C singals to other routines (local requests) + // closing C signals to other routines (local requests) // that the chunk is has been retrieved close(entry.Req.C) // deliver the chunk to requesters upstream diff --git a/swarm/storage/types.go b/swarm/storage/types.go index c36522012..f3ab99c6c 100644 --- a/swarm/storage/types.go +++ b/swarm/storage/types.go @@ -177,7 +177,7 @@ It relies on the underlying chunking model. When calling Split, the caller provides a channel (chan *Chunk) on which it receives chunks to store. The DPA delegates to storage layers (implementing ChunkStore interface). Split returns an error channel, which the caller can monitor. -After getting notified that all the data has been split (the error channel is closed), the caller can safely read or save the root key. Optionally it times out if not all chunks get stored or not the entire stream of data has been processed. By inspecting the errc channel the caller can check if any explicit errors (typically IO read/write failures) occured during splitting. +After getting notified that all the data has been split (the error channel is closed), the caller can safely read or save the root key. Optionally it times out if not all chunks get stored or not the entire stream of data has been processed. By inspecting the errc channel the caller can check if any explicit errors (typically IO read/write failures) occurred during splitting. When calling Join with a root key, the caller gets returned a seekable lazy reader. The caller again provides a channel on which the caller receives placeholder chunks with missing data. The DPA is supposed to forward this to the chunk stores and notify the chunker if the data has been delivered (i.e. retrieved from memory cache, disk-persisted db or cloud based swarm delivery). As the seekable reader is used, the chunker then puts these together the relevant parts on demand. */ diff --git a/tests/files/BlockchainTests/TestNetwork/bcTheDaoTest.json b/tests/files/BlockchainTests/TestNetwork/bcTheDaoTest.json index fcbcbbe9f..1dfdfb70a 100644 --- a/tests/files/BlockchainTests/TestNetwork/bcTheDaoTest.json +++ b/tests/files/BlockchainTests/TestNetwork/bcTheDaoTest.json @@ -1,6 +1,6 @@ { "DaoTransactions" : { - "acomment" : "This test checks DAO hardfork transition at block 8. According to specification given list of accounts L from the prestate (except a94f5374fce5edbc8e2a8697c15331677e6ebf0b (caller)) should transfer it's balance at the begining of the block 8 to contract C = bf4ed7b27f1d666546e30d74d50d173d20bca754. Then all blocks from 8 to 17(included) must have extradata set to 0x64616f2d686172642d666f726b otherwise blocks considered incorrect. Additionally all uncles with numbers from 8 to 17(included) in this blocks should corespond to extradata requirenmets.", + "acomment" : "This test checks DAO hardfork transition at block 8. According to specification given list of accounts L from the prestate (except a94f5374fce5edbc8e2a8697c15331677e6ebf0b (caller)) should transfer it's balance at the beginning of the block 8 to contract C = bf4ed7b27f1d666546e30d74d50d173d20bca754. Then all blocks from 8 to 17(included) must have extradata set to 0x64616f2d686172642d666f726b otherwise blocks considered incorrect. Additionally all uncles with numbers from 8 to 17(included) in this blocks should corespond to extradata requirenmets.", "blocks" : [ { "blockHeader" : { @@ -2430,7 +2430,7 @@ } }, "DaoTransactions_EmptyTransactionAndForkBlocksAhead" : { - "acomment" : "This test checks DAO hardfork transition at block 8. According to specification given list of accounts L from the prestate (except a94f5374fce5edbc8e2a8697c15331677e6ebf0b (caller)) should transfer it's balance at the begining of the block 8 to contract C = bf4ed7b27f1d666546e30d74d50d173d20bca754. Then all blocks from 8 to 17(included) must have extradata set to 0x64616f2d686172642d666f726b otherwise blocks considered incorrect. Additionally all uncles with numbers from 8 to 17(included) in this blocks should corespond to extradata requirenmets.", + "acomment" : "This test checks DAO hardfork transition at block 8. According to specification given list of accounts L from the prestate (except a94f5374fce5edbc8e2a8697c15331677e6ebf0b (caller)) should transfer it's balance at the beginning of the block 8 to contract C = bf4ed7b27f1d666546e30d74d50d173d20bca754. Then all blocks from 8 to 17(included) must have extradata set to 0x64616f2d686172642d666f726b otherwise blocks considered incorrect. Additionally all uncles with numbers from 8 to 17(included) in this blocks should corespond to extradata requirenmets.", "blocks" : [ { "blockHeader" : { @@ -4516,7 +4516,7 @@ } }, "DaoTransactions_UncleExtradata" : { - "acomment" : "This test checks DAO hardfork transition at block 8. According to specification given list of accounts L from the prestate (except a94f5374fce5edbc8e2a8697c15331677e6ebf0b (caller)) should transfer it's balance at the begining of the block 8 to contract C = bf4ed7b27f1d666546e30d74d50d173d20bca754. Then all blocks from 8 to 17(included) must have extradata set to 0x64616f2d686172642d666f726b otherwise blocks considered incorrect. Additionally all uncles with numbers from 8 to 17(included) in this blocks should corespond to extradata requirenmets.", + "acomment" : "This test checks DAO hardfork transition at block 8. According to specification given list of accounts L from the prestate (except a94f5374fce5edbc8e2a8697c15331677e6ebf0b (caller)) should transfer it's balance at the beginning of the block 8 to contract C = bf4ed7b27f1d666546e30d74d50d173d20bca754. Then all blocks from 8 to 17(included) must have extradata set to 0x64616f2d686172642d666f726b otherwise blocks considered incorrect. Additionally all uncles with numbers from 8 to 17(included) in this blocks should corespond to extradata requirenmets.", "blocks" : [ { "blockHeader" : { diff --git a/tests/files/ansible/test-files/docker-cpp/Dockerfile b/tests/files/ansible/test-files/docker-cpp/Dockerfile index a3b0e4ca6..11c8bf5e7 100644 --- a/tests/files/ansible/test-files/docker-cpp/Dockerfile +++ b/tests/files/ansible/test-files/docker-cpp/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcu RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons RUN apt-get install -qy libjsoncpp-dev libargtable2-dev -# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) +# NCurses based GUI (not optional though for a successful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) RUN apt-get install -qy libncurses5-dev # Qt-based GUI diff --git a/tests/files/ansible/test-files/docker-cppjit/Dockerfile b/tests/files/ansible/test-files/docker-cppjit/Dockerfile index 2b10727f0..6b3712555 100644 --- a/tests/files/ansible/test-files/docker-cppjit/Dockerfile +++ b/tests/files/ansible/test-files/docker-cppjit/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcu RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons RUN apt-get install -qy libjsoncpp-dev libargtable2-dev -# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) +# NCurses based GUI (not optional though for a successful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 ) RUN apt-get install -qy libncurses5-dev # Qt-based GUI diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index f3b9fd1c9..25e55886f 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -178,7 +178,7 @@ func runVmTest(test VmTest) error { // Check gas usage if len(test.Gas) == 0 && err == nil { - return fmt.Errorf("gas unspecified, indicating an error. VM returned (incorrectly) successfull") + return fmt.Errorf("gas unspecified, indicating an error. VM returned (incorrectly) successful") } else { gexp := common.Big(test.Gas) if gexp.Cmp(gas) != 0 { diff --git a/trie/hasher.go b/trie/hasher.go index e6261819c..98c309531 100644 --- a/trie/hasher.go +++ b/trie/hasher.go @@ -52,7 +52,7 @@ func returnHasherToPool(h *hasher) { // hash collapses a node down into a hash node, also returning a copy of the // original node initialzied with the computed hash to replace the original one. func (h *hasher) hash(n node, db DatabaseWriter, force bool) (node, node, error) { - // If we're not storing the node, just hashing, use avaialble cached data + // If we're not storing the node, just hashing, use available cached data if hash, dirty := n.cache(); hash != nil { if db == nil { return hash, n, nil diff --git a/whisper/whisperv5/doc.go b/whisper/whisperv5/doc.go index e2e255e9e..8ec81b180 100644 --- a/whisper/whisperv5/doc.go +++ b/whisper/whisperv5/doc.go @@ -42,7 +42,7 @@ const ( statusCode = 0 // used by whisper protocol messagesCode = 1 // normal whisper message - p2pCode = 2 // peer-to-peer message (to be consumed by the peer, but not forwarded any futher) + p2pCode = 2 // peer-to-peer message (to be consumed by the peer, but not forwarded any further) p2pRequestCode = 3 // peer-to-peer message, used by Dapp protocol NumberOfMessageCodes = 64