Merge pull request #3526 from karalabe/misspell

all: fix spelling errors
This commit is contained in:
Péter Szilágyi 2017-01-06 20:03:44 +02:00 committed by GitHub
commit 17182732f5
40 changed files with 65 additions and 65 deletions

View File

@ -294,7 +294,7 @@ func getInfo(files <-chan string, out chan<- *info, wg *sync.WaitGroup) {
wg.Done() 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) { func fileInfo(file string) (*info, error) {
info := &info{file: file, Year: int64(time.Now().Year())} 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) cmd := exec.Command("git", "log", "--follow", "--find-renames=80", "--find-copies=80", "--pretty=format:%ai", "--", file)

View File

@ -114,7 +114,7 @@ var (
} }
CorsStringFlag = cli.StringFlag{ CorsStringFlag = cli.StringFlag{
Name: "corsdomain", 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 ',')",
} }
) )

View File

@ -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 // 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. // RPC method (saved in jeth.newAccount) with it to actually execute the RPC call.
func (b *bridge) NewAccount(call otto.FunctionCall) (response otto.Value) { func (b *bridge) NewAccount(call otto.FunctionCall) (response otto.Value) {
var ( var (
@ -75,7 +75,7 @@ func (b *bridge) NewAccount(call otto.FunctionCall) (response otto.Value) {
default: default:
throwJSException("expected 0 or 1 string argument") 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) ret, err := call.Otto.Call("jeth.newAccount", nil, password)
if err != nil { if err != nil {
throwJSException(err.Error()) 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 // 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 // original RPC method (saved in jeth.unlockAccount) with it to actually execute
// the RPC call. // the RPC call.
func (b *bridge) UnlockAccount(call otto.FunctionCall) (response otto.Value) { 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 // 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. // jeth.sign) with it to actually execute the RPC call.
func (b *bridge) Sign(call otto.FunctionCall) (response otto.Value) { func (b *bridge) Sign(call otto.FunctionCall) (response otto.Value) {
var ( var (

View File

@ -44,7 +44,7 @@ type UserPrompter interface {
PromptConfirm(prompt string) (bool, error) PromptConfirm(prompt string) (bool, error)
// SetHistory sets the the input scrollback history that the prompter will allow // 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) SetHistory(history []string)
// AppendHistory appends an entry to the scrollback history. It should be called // 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 // 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) { func (p *terminalPrompter) SetHistory(history []string) {
p.State.ReadHistory(strings.NewReader(strings.Join(history, "\n"))) p.State.ReadHistory(strings.NewReader(strings.Join(history, "\n")))
} }

View File

@ -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) return nil, fmt.Errorf("amount must be greater than zero (%v)", amount)
} }
if self.balance.Cmp(amount) < 0 { 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 { } else {
var sig []byte var sig []byte
sent, found := self.sent[beneficiary] 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 // 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 // so we reattempt depositing
if self.threshold != nil { if self.threshold != nil {
if self.balance.Cmp(self.threshold) < 0 { if self.balance.Cmp(self.threshold) < 0 {

View File

@ -78,7 +78,7 @@ contract ReleaseOracle {
} }
// signers is an accessor method to retrieve all te signers (public accessor // 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[]) { function signers() constant returns(address[]) {
return voters; return voters;
} }
@ -178,7 +178,7 @@ contract ReleaseOracle {
voters[i] = voters[voters.length - 1]; voters[i] = voters[voters.length - 1];
voters.length--; voters.length--;
delete verProp; // Nuke any version proposal (no suprise releases!) delete verProp; // Nuke any version proposal (no surprise releases!)
break; break;
} }
} }

View File

@ -210,7 +210,7 @@ func (self *StateDB) Exist(addr common.Address) bool {
return self.GetStateObject(addr) != nil 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) // or empty according to the EIP161 specification (balance = nonce = code = 0)
func (self *StateDB) Empty(addr common.Address) bool { func (self *StateDB) Empty(addr common.Address) bool {
so := self.GetStateObject(addr) so := self.GetStateObject(addr)

View File

@ -216,7 +216,7 @@ func (m *txSortedMap) Flatten() types.Transactions {
// txList is a "list" of transactions belonging to an account, sorted by account // 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 // 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- // 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 { type txList struct {
strict bool // Whether nonces are strictly continuous or not strict bool // Whether nonces are strictly continuous or not
txs *txSortedMap // Heap indexed sorted hash map of the transactions txs *txSortedMap // Heap indexed sorted hash map of the transactions

View File

@ -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 // add validates a transaction and inserts it into the non-executable queue for
// later pending promotion and execution. // later pending promotion and execution.
func (pool *TxPool) add(tx *types.Transaction) error { 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() hash := tx.Hash()
if pool.all[hash] != nil { if pool.all[hash] != nil {
return fmt.Errorf("Known transaction: %x", hash[:4]) return fmt.Errorf("Known transaction: %x", hash[:4])

View File

@ -34,7 +34,7 @@ type (
GetHashFunc func(uint64) common.Hash 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 { type Context struct {
// CanTransfer returns whether the account contains // CanTransfer returns whether the account contains
// sufficient ether to transfer the value // sufficient ether to transfer the value
@ -99,7 +99,7 @@ func (evm *EVM) Cancel() {
atomic.StoreInt32(&evm.abort, 1) 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 // 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. // 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) { 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 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 // 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. // 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 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. // 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 // DelegateCall differs from CallCode in the sense that it executes the given address' code with the caller as context

View File

@ -194,9 +194,9 @@ func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) {
// Sign calculates an ECDSA signature. // 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 // 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. // 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. // The produced signature is in the [R || S || V] format where V is 0 or 1.

View File

@ -93,7 +93,7 @@ func ImportECDSA(prv *ecdsa.PrivateKey) *PrivateKey {
} }
// Generate an elliptic curve public / private keypair. If params is nil, // 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) { func GenerateKey(rand io.Reader, curve elliptic.Curve, params *ECIESParams) (prv *PrivateKey, err error) {
pb, x, y, err := elliptic.GenerateKey(curve, rand) pb, x, y, err := elliptic.GenerateKey(curve, rand)
if err != nil { if err != nil {

View File

@ -99,7 +99,7 @@ SECP256K1_API int secp256k1_schnorr_generate_nonce_pair(
/** Produce a partial Schnorr signature, which can be combined using /** Produce a partial Schnorr signature, which can be combined using
* secp256k1_schnorr_partial_combine, to end up with a full signature that is * secp256k1_schnorr_partial_combine, to end up with a full signature that is
* verifiable using secp256k1_schnorr_verify. * 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 * 0: no valid signature exists with this combination of keys, nonces
* and message (chance around 1 in 2^128) * and message (chance around 1 in 2^128)
* -1: invalid private key, nonce, or public nonces. * -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); ) 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. /** 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) * 0: the resulting signature is not valid (chance of 1 in 2^256)
* -1: some inputs were invalid, or the signatures were not created * -1: some inputs were invalid, or the signatures were not created
* using the same set of nonces * using the same set of nonces

View File

@ -163,7 +163,7 @@ int secp256k1_ecdsa_sign_compact(const unsigned char *msg, int msglen,
int *recid); int *recid);
* Recover an ECDSA public key from a compact signature. * 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. * 0: otherwise.
* In: msg: the message assumed to be signed * In: msg: the message assumed to be signed
* msglen: the length of the message * msglen: the length of the message

View File

@ -49,7 +49,7 @@ import (
/* /*
TODO: 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) > byte permutation (changing)
> xor with chaning random block (to deter scanning memory for 0x63) (stream cipher?) > xor with chaning random block (to deter scanning memory for 0x63) (stream cipher?)
*/ */

View File

@ -435,7 +435,7 @@ func (api *PrivateDebugAPI) traceBlock(block *types.Block, logConfig *vm.LogConf
return true, structLogger.StructLogs(), nil 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 { type callmsg struct {
addr common.Address addr common.Address
to *common.Address to *common.Address

View File

@ -1005,7 +1005,7 @@ func (d *Downloader) fetchNodeData() error {
// - fetchHook: tester callback to notify of new tasks being initiated (allows testing the scheduling logic) // - 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 // - 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) // - 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 // - 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) // - 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 mesages

View File

@ -37,7 +37,7 @@ import (
type Type byte type Type byte
const ( const (
// UnknownSubscription indicates an unkown subscription type // UnknownSubscription indicates an unknown subscription type
UnknownSubscription Type = iota UnknownSubscription Type = iota
// LogsSubscription queries for new or removed (chain reorg) logs // LogsSubscription queries for new or removed (chain reorg) logs
LogsSubscription LogsSubscription

View File

@ -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}, {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 // 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}, {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}, {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 // 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}, {FilterCriteria{Addresses: []common.Address{thirdAddress}, Topics: [][]common.Hash{{firstTopic, forthTopic}}}, []*types.Log{allLogs[5].Logs[0], allLogs[5].Logs[2]}, nil, nil},

View File

@ -491,7 +491,7 @@ func testDAOChallenge(t *testing.T, localForked, remoteForked bool, timeout bool
if err := p2p.ExpectMsg(peer.app, GetBlockHeadersMsg, challenge); err != nil { if err := p2p.ExpectMsg(peer.app, GetBlockHeadersMsg, challenge); err != nil {
t.Fatalf("challenge mismatch: %v", err) 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 { if !timeout {
blocks, _ := core.GenerateChain(&params.ChainConfig{}, genesis, db, 1, func(i int, block *core.BlockGen) { blocks, _ := core.GenerateChain(&params.ChainConfig{}, genesis, db, 1, func(i int, block *core.BlockGen) {
if remoteForked { if remoteForked {

View File

@ -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) t.Errorf("test %d: wrong error: got %q, want %q", i, err, test.wantError)
} }
case <-time.After(2 * time.Second): 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() p.close()
} }

View File

@ -470,7 +470,7 @@ func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.A
return res.Hex(), nil 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 { type callmsg struct {
addr common.Address addr common.Address
to *common.Address to *common.Address
@ -541,14 +541,14 @@ func (s *PublicBlockChainAPI) doCall(ctx context.Context, args CallArgs, blockNr
if err := vmError(); err != nil { if err := vmError(); err != nil {
return "0x", common.Big0, err return "0x", common.Big0, err
} }
if len(res) == 0 { // backwards compatability if len(res) == 0 { // backwards compatibility
return "0x", gas, err return "0x", gas, err
} }
return common.ToHex(res), gas, err return common.ToHex(res), gas, err
} }
// Call executes the given transaction on the state for the given block number. // 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) { func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (string, error) {
result, _, err := s.doCall(ctx, args, blockNr) result, _, err := s.doCall(ctx, args, blockNr)
return result, err return result, err

View File

@ -2278,7 +2278,7 @@ var toTwosComplement = function (number) {
* Checks if the given string is strictly an address * Checks if the given string is strictly an address
* *
* @method isStrictAddress * @method isStrictAddress
* @param {String} address the given HEX adress * @param {String} address the given HEX address
* @return {Boolean} * @return {Boolean}
*/ */
var isStrictAddress = function (address) { var isStrictAddress = function (address) {
@ -2289,7 +2289,7 @@ var isStrictAddress = function (address) {
* Checks if the given string is an address * Checks if the given string is an address
* *
* @method isAddress * @method isAddress
* @param {String} address the given HEX adress * @param {String} address the given HEX address
* @return {Boolean} * @return {Boolean}
*/ */
var isAddress = function (address) { var isAddress = function (address) {
@ -2311,7 +2311,7 @@ var isAddress = function (address) {
* Checks if the given string is a checksummed address * Checks if the given string is a checksummed address
* *
* @method isChecksumAddress * @method isChecksumAddress
* @param {String} address the given HEX adress * @param {String} address the given HEX address
* @return {Boolean} * @return {Boolean}
*/ */
var isChecksumAddress = function (address) { var isChecksumAddress = function (address) {
@ -2334,7 +2334,7 @@ var isChecksumAddress = function (address) {
* Makes a checksum address * Makes a checksum address
* *
* @method toChecksumAddress * @method toChecksumAddress
* @param {String} address the given HEX adress * @param {String} address the given HEX address
* @return {String} * @return {String}
*/ */
var toChecksumAddress = function (address) { 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 * @method toAddress
* @param {String} address * @param {String} address
@ -3000,7 +3000,7 @@ var ContractFactory = function (eth, abi) {
if (callback) { 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) { this.eth.sendTransaction(options, function (err, hash) {
if (err) { if (err) {
callback(err); callback(err);
@ -3480,7 +3480,7 @@ Adds the callback and sets up the methods, to iterate over the results.
@method getLogsAtStart @method getLogsAtStart
@param {Object} self @param {Object} self
@param {funciton} @param {function}
*/ */
var getLogsAtStart = function(self, callback){ var getLogsAtStart = function(self, callback){
// call getFilterLogs for the first watch callback start // call getFilterLogs for the first watch callback start
@ -6429,7 +6429,7 @@ var transferToAddress = function (eth, from, to, value, callback) {
* @method deposit * @method deposit
* @param {String} from * @param {String} from
* @param {String} to * @param {String} to
* @param {Value} value to be transfered * @param {Value} value to be transferred
* @param {String} client unique identifier * @param {String} client unique identifier
* @param {Function} callback, callback * @param {Function} callback, callback
*/ */
@ -13381,10 +13381,10 @@ module.exports = transfer;
* equivalent to (a % n) in JavaScript. * equivalent to (a % n) in JavaScript.
* FLOOR 3 The remainder has the same sign as the divisor (Python %). * FLOOR 3 The remainder has the same sign as the divisor (Python %).
* HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. * 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 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. * modes are commonly used for the modulus operation.
* Although the other rounding modes can also be used, they may not give useful results. * 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 ) { 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) // r = x - qy where 0 <= r < abs(y)
s = y.s; s = y.s;
y.s = 1; y.s = 1;

View File

@ -72,7 +72,7 @@ type meteredMsgReadWriter struct {
} }
// newMeteredMsgWriter wraps a p2p MsgReadWriter with metering support. If the // 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 { func newMeteredMsgWriter(rw p2p.MsgReadWriter) p2p.MsgReadWriter {
if !metrics.Enabled { if !metrics.Enabled {
return rw return rw

View File

@ -492,7 +492,7 @@ func (self *worker) commitNewWork() {
} }
badUncles = append(badUncles, hash) badUncles = append(badUncles, hash)
} else { } 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()) uncles = append(uncles, uncle.Header())
} }
} }

View File

@ -44,7 +44,7 @@ func (s *SampleService) Stop() error { fmt.Println("Service stoppi
func ExampleUsage() { func ExampleUsage() {
// Create a network node to run protocols with the default values. The below list // 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 // 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{ nodeConfig := &node.Config{
DataDir: "", // Empty uses ephemeral storage DataDir: "", // Empty uses ephemeral storage
PrivateKey: nil, // Nil generates a node key on the fly PrivateKey: nil, // Nil generates a node key on the fly

View File

@ -234,7 +234,7 @@ func TestUDP_findnode(t *testing.T) {
defer test.table.Close() defer test.table.Close()
// put a few nodes into the table. their exact // 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. // take care not to overflow any bucket.
targetHash := crypto.Keccak256Hash(testTarget[:]) targetHash := crypto.Keccak256Hash(testTarget[:])
nodes := &nodesByDistance{target: targetHash} nodes := &nodesByDistance{target: targetHash}

View File

@ -126,7 +126,7 @@ var (
// defer test.table.Close() // defer test.table.Close()
// //
// // put a few nodes into the table. their exact // // 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. // // take care not to overflow any bucket.
// targetHash := crypto.Keccak256Hash(testTarget[:]) // targetHash := crypto.Keccak256Hash(testTarget[:])
// nodes := &nodesByDistance{target: targetHash} // nodes := &nodesByDistance{target: targetHash}

View File

@ -58,7 +58,7 @@ var (
Ripemd160WordGas = big.NewInt(120) // Ripemd160WordGas = big.NewInt(120) //
MinimumDifficulty = big.NewInt(131072) // The minimum that the difficulty may ever be. MinimumDifficulty = big.NewInt(131072) // The minimum that the difficulty may ever be.
CallCreateDepth = big.NewInt(1024) // Maximum depth of call/create stack. 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. LogGas = big.NewInt(375) // Per LOG* operation.
CopyGas = big.NewInt(3) // CopyGas = big.NewInt(3) //
StackLimit = big.NewInt(1024) // Maximum size of VM stack allowed. StackLimit = big.NewInt(1024) // Maximum size of VM stack allowed.

View File

@ -30,7 +30,7 @@ var (
ErrSubscriptionNotFound = errors.New("subscription not found") 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 type ID string
// a Subscription is created by a notifier and tight to that notifier. The client can use // a Subscription is created by a notifier and tight to that notifier. The client can use

View File

@ -62,7 +62,7 @@ func (s *NotificationTestService) SomeSubscription(ctx context.Context, n, val i
subscription := notifier.CreateSubscription() subscription := notifier.CreateSubscription()
go func() { 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 // will probably be dropped since the subscription ID might not be send to
// the client. // the client.
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)

View File

@ -135,7 +135,7 @@ const (
LatestBlockNumber = BlockNumber(-1) 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 // - "latest", "earliest" or "pending" as string arguments
// - the block number // - the block number
// Returned errors: // Returned errors:

View File

@ -99,7 +99,7 @@ func (self *NetStore) Put(entry *Chunk) {
// handle deliveries // handle deliveries
if entry.Req != nil { if entry.Req != nil {
glog.V(logger.Detail).Infof("NetStore.Put: localStore.Put %v hit existing request...delivering", entry.Key.Log()) 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 // that the chunk is has been retrieved
close(entry.Req.C) close(entry.Req.C)
// deliver the chunk to requesters upstream // deliver the chunk to requesters upstream

View File

@ -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). 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. 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. 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.
*/ */

View File

@ -1,6 +1,6 @@
{ {
"DaoTransactions" : { "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" : [ "blocks" : [
{ {
"blockHeader" : { "blockHeader" : {
@ -2430,7 +2430,7 @@
} }
}, },
"DaoTransactions_EmptyTransactionAndForkBlocksAhead" : { "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" : [ "blocks" : [
{ {
"blockHeader" : { "blockHeader" : {
@ -4516,7 +4516,7 @@
} }
}, },
"DaoTransactions_UncleExtradata" : { "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" : [ "blocks" : [
{ {
"blockHeader" : { "blockHeader" : {

View File

@ -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 automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons
RUN apt-get install -qy libjsoncpp-dev libargtable2-dev 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 RUN apt-get install -qy libncurses5-dev
# Qt-based GUI # Qt-based GUI

View File

@ -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 automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons
RUN apt-get install -qy libjsoncpp-dev libargtable2-dev 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 RUN apt-get install -qy libncurses5-dev
# Qt-based GUI # Qt-based GUI

View File

@ -178,7 +178,7 @@ func runVmTest(test VmTest) error {
// Check gas usage // Check gas usage
if len(test.Gas) == 0 && err == nil { 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 { } else {
gexp := common.Big(test.Gas) gexp := common.Big(test.Gas)
if gexp.Cmp(gas) != 0 { if gexp.Cmp(gas) != 0 {

View File

@ -52,7 +52,7 @@ func returnHasherToPool(h *hasher) {
// hash collapses a node down into a hash node, also returning a copy of the // 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. // 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) { 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 hash, dirty := n.cache(); hash != nil {
if db == nil { if db == nil {
return hash, n, nil return hash, n, nil

View File

@ -42,7 +42,7 @@ const (
statusCode = 0 // used by whisper protocol statusCode = 0 // used by whisper protocol
messagesCode = 1 // normal whisper message 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 p2pRequestCode = 3 // peer-to-peer message, used by Dapp protocol
NumberOfMessageCodes = 64 NumberOfMessageCodes = 64