diff --git a/build/update-license.go b/build/update-license.go index e0c273deff9765b1535ac377f786093bf7b5d0e1..f3335b11966bb9cc362f6382939a8836262fb1bd 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 71f53082ab3c7ea67be9f390efe79cebe5bf8818..87e21fb7fc70b3bec727785e44637b36dd6f9100 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 7f7e6feb11aa314e0e7ee9ace50fb0659849bc2e..1c5bc8419aa1981317fbcee23fae3e27de74a3fd 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 5946d9ece3762c3aec3725e10f4b09c20bd07804..6acbfb0e254cb44c96432aab328ed05c8366e57b 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 5ece1391b5d9c55b3cad2a87bf110fd6a0f70216..d49964f91b4aa918f67416db896ebfb6ffcfd318 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 fedf646c074407c85421b1d3c3eba08ae53524fc..554cf72900c77ff84939ebcc57a643e8c7b412db 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 75c40b364e02f813ff17e4b08a42a1d8bd2d5f29..063e2b4697b16d685a854247005c1b66918e3960 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 95831c83b11ea75959a63317f49806d49b27e86e..535cb9dd6dae98222ce98e76b36ad3ab26190e9f 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 2e1e5c63efbd02f3e5deacda5b57de2baafb9d19..58922f12fc2edc895ce8ae08afee3f4abdb4295a 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 b74b3a7950630e18d49c1db35150383783dd7b99..c19ef464bae801eb77c28bb3a1c73afe385976a7 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 f1a4b774c0bc28d6c2d0f313eac99945cd7582f5..ce45ebd3897745363c93b701ac0c725d92b7b7c8 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 b1a716c00598e77ab61c1962dac674d7b9e3d574..2a16f20a2e6c63658625b05d0e5de7c0d4ee77b0 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 49354933da7101000b5ae844de06887495bdca30..9b4f5b607c98f6e8d2175642c0098becaf01b189 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 93e6d1902f9c272f536c027265c461ad6a6d0a80..49fcf8e2d5ab578246fc5bec0cb8e4855ea52b7c 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 4999c5c951a0a43f4aaff4ec50debd86a347b94f..2c5f61450418b57a1daa186b45b17b5593c50e9f 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 f077e348c85ca4542bb8582a58ee932941a1fc7a..d798c196e9c94d995ef2301e9e3e6c02f2b03861 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 b1f4b8169bf7204d29464213ac28b9b98ab324e7..9be4bd87d0f8304418f2ac3e6204c3ce1d4928fd 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 7493dd231e28ab78d7c338680a36b02aadfe6d34..e0ee2ff5141ee6307e16ca04cb47135be5a68cae 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 cd0745ec13c46fe18b88756a6db1e8fd0fade87d..1cfced7e4154817c2c0ab005108b5a87da598d2c 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 4695b3f60554f515694f76c1c77236444d45924a..22a4ddf50a8d059be16b0ea31dc30b39321176fc 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 43149d0c0e7cc4597edd88a99960bc3204a58967..3b805643334dcff5b87cdf61fad2344f41a4f6cd 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 4b9ce068f71163d4b534aa49dc1f76b09e7451ca..7ea2160291b4e9b6a01c0f3b8ce2a09de1e3e4d9 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 b4eef194cb6b386af35842e2c133cafdcc226d77..e1cee8650c4375b99522c1b84b239999e45b5893 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 aa0796790e1db8280b64c2ad9d93d4c7950cee34..0162a1d1ad5b9539a7745923b5b1f03b42328546 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 56fd4ea663b5e127802809d36d5b42b46b81d687..77e4e02059d30ef926c8d2da4070202eff25b16a 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 01ff683c0315674e2056292088cb741509db97fe..7c586452f4218b2a8e4a99f87be5ec1909db4131 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 8bca37ffedaafd8bb7f1a6594a29ebce3c4b843f..21e8b561da12ba0044b31510bf12b30d63dbf4f8 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 98c7376696e0c8841a060d151e9dd3206d70a678..7d31815947cf46b87138c8c388ff642d9e30c240 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 e98925c2b9dcc24dee45f0faa3c4403c86743a70..f5b6bedeb7b9890c75ac08b87be53a5f7e68e1bd 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 863d34b20267cd0ba932c8496a3e4f301f34b0fe..bcdc3cdfcadebc0c266b0a8cc6b51b614fd2e936 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 8bb3416947dfc52bf2c0e73b0e4c2337fc640986..97f2c0d65bfacb8f4c2f15f3e519374ec5b4cd3f 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 01b95a170d873d27bb2b374163bf9e8e15377f7d..d8d736efbcba57aed6a52fc98449f513ac1b0f1e 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 334229aedf6a942616ed450c4f64a68e593f5605..f97862bbbd78e07d632435eea844e2e980d72ecc 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 c3652201220a79d26d10b5bcc7fc85eab0068e30..f3ab99c6c8a6b9bc5bf8b3fea3c771bcbb2c8601 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 fcbcbbe9fd8f386c34859e2e0643cbf18bf42515..1dfdfb70ae9c9b761dedc744b1887fc0ce3eed3a 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 a3b0e4ca6d5a20578a8b70a4b302f870e928ff30..11c8bf5e70167870899f2cc5db7708480eca346d 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 2b10727f05f12f8e2ad20dc7e8d53e838333cad3..6b37125559ae54d45236c53da574d05a2fa9b9b8 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 f3b9fd1c91e76cfce545feed6d3f436833fad686..25e55886f4a8f4fbb416580d9d5f37f1dd656944 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 e6261819c1c66d59ac07af075b50e220bf05b4e5..98c3095316f9fe52121a5d86e28c48dee8f5dc1d 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 e2e255e9e179c0f55c98bf59c9adb0badcfc5db3..8ec81b180c1e073ec3b66390a079fdc8752aa651 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