mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fix typo/spelling errors
This commit is contained in:
parent
fed692f67e
commit
93f341d8fe
12 changed files with 83 additions and 83 deletions
2
Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_ts.go
generated
vendored
2
Godeps/_workspace/src/gopkg.in/fatih/set.v0/set_ts.go
generated
vendored
|
|
@ -10,7 +10,7 @@ type Set struct {
|
||||||
l sync.RWMutex // we name it because we don't want to expose it
|
l sync.RWMutex // we name it because we don't want to expose it
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates and initialize a new Set. It's accept a variable number of
|
// New creates and initialize a new Set. It accepts a variable number of
|
||||||
// arguments to populate the initial set. If nothing passed a Set with zero
|
// arguments to populate the initial set. If nothing passed a Set with zero
|
||||||
// size is created.
|
// size is created.
|
||||||
func New(items ...interface{}) *Set {
|
func New(items ...interface{}) *Set {
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ type (e.g. `Slice()` returns []interface{}, `Uint()` return 0, etc).
|
||||||
|
|
||||||
### Creating a new Value
|
### Creating a new Value
|
||||||
|
|
||||||
`NewEmptyValue()` returns a new \*Value with it's initial value set to a
|
`NewEmptyValue()` returns a new \*Value with its initial value set to a
|
||||||
`[]interface{}`
|
`[]interface{}`
|
||||||
|
|
||||||
`AppendList()` appends a list to the current value.
|
`AppendList()` appends a list to the current value.
|
||||||
|
|
|
||||||
|
|
@ -309,7 +309,7 @@ var c = require('../utils/config');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats input value to byte representation of int
|
* Formats input value to byte representation of int
|
||||||
* If value is negative, return it's two's complement
|
* If value is negative, return its two's complement
|
||||||
* If the value is floating point, round it down
|
* If the value is floating point, round it down
|
||||||
*
|
*
|
||||||
* @method formatInputInt
|
* @method formatInputInt
|
||||||
|
|
@ -787,7 +787,7 @@ var findIndex = function (array, callback) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should be called to get sting from it's hex representation
|
* Should be called to get sting from its hex representation
|
||||||
*
|
*
|
||||||
* @method toAscii
|
* @method toAscii
|
||||||
* @param {String} string in hex
|
* @param {String} string in hex
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ func NewBlockValidator(config *ChainConfig, blockchain *BlockChain, pow pow.PoW)
|
||||||
//
|
//
|
||||||
// ValidateBlock also validates and makes sure that any previous state (or present)
|
// ValidateBlock also validates and makes sure that any previous state (or present)
|
||||||
// state that might or might not be present is checked to make sure that fast
|
// state that might or might not be present is checked to make sure that fast
|
||||||
// sync has done it's job proper. This prevents the block validator form accepting
|
// sync has done its job proper. This prevents the block validator form accepting
|
||||||
// false positives where a header is present but the state is not.
|
// false positives where a header is present but the state is not.
|
||||||
func (v *BlockValidator) ValidateBlock(block *types.Block) error {
|
func (v *BlockValidator) ValidateBlock(block *types.Block) error {
|
||||||
if v.bc.HasBlock(block.Hash()) {
|
if v.bc.HasBlock(block.Hash()) {
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ func (c *Contract) Address() common.Address {
|
||||||
return c.self.Address()
|
return c.self.Address()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Value returns the contracts value (sent to it from it's caller)
|
// Value returns the contracts value (sent to it from its caller)
|
||||||
func (c *Contract) Value() *big.Int {
|
func (c *Contract) Value() *big.Int {
|
||||||
return c.value
|
return c.value
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ func setDefaults(cfg *Config) {
|
||||||
//
|
//
|
||||||
// Executes sets up a in memory, temporarily, environment for the execution of
|
// Executes sets up a in memory, temporarily, environment for the execution of
|
||||||
// the given code. It enabled the JIT by default and make sure that it's restored
|
// the given code. It enabled the JIT by default and make sure that it's restored
|
||||||
// to it's original state afterwards.
|
// to its original state afterwards.
|
||||||
func Execute(code, input []byte, cfg *Config) ([]byte, *state.StateDB, error) {
|
func Execute(code, input []byte, cfg *Config) ([]byte, *state.StateDB, error) {
|
||||||
if cfg == nil {
|
if cfg == nil {
|
||||||
cfg = new(Config)
|
cfg = new(Config)
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode
|
||||||
}
|
}
|
||||||
|
|
||||||
// synchronise will select the peer and use it for synchronising. If an empty string is given
|
// synchronise will select the peer and use it for synchronising. If an empty string is given
|
||||||
// it will use the best peer possible and synchronize if it's TD is higher than our own. If any of the
|
// it will use the best peer possible and synchronize if its TD is higher than our own. If any of the
|
||||||
// checks fail an error will be returned. This method is synchronous
|
// checks fail an error will be returned. This method is synchronous
|
||||||
func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int, mode SyncMode) error {
|
func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int, mode SyncMode) error {
|
||||||
// Mock out the synchronisation if testing
|
// Mock out the synchronisation if testing
|
||||||
|
|
@ -1200,7 +1200,7 @@ func (d *Downloader) processHeaders(origin uint64, td *big.Int) error {
|
||||||
case <-d.cancelCh:
|
case <-d.cancelCh:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If no headers were retrieved at all, the peer violated it's TD promise that it had a
|
// If no headers were retrieved at all, the peer violated its TD promise that it had a
|
||||||
// better chain compared to ours. The only exception is if it's promised blocks were
|
// better chain compared to ours. The only exception is if it's promised blocks were
|
||||||
// already imported by other means (e.g. fecher):
|
// already imported by other means (e.g. fecher):
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -1331,7 +1331,7 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol int) {
|
||||||
defer tester.terminate()
|
defer tester.terminate()
|
||||||
|
|
||||||
for i, tt := range tests {
|
for i, tt := range tests {
|
||||||
// Register a new peer and ensure it's presence
|
// Register a new peer and ensure its presence
|
||||||
id := fmt.Sprintf("test %d", i)
|
id := fmt.Sprintf("test %d", i)
|
||||||
if err := tester.newPeer(id, protocol, []common.Hash{genesis.Hash()}, nil, nil, nil); err != nil {
|
if err := tester.newPeer(id, protocol, []common.Hash{genesis.Hash()}, nil, nil, nil); err != nil {
|
||||||
t.Fatalf("test %d: failed to register new peer: %v", i, err)
|
t.Fatalf("test %d: failed to register new peer: %v", i, err)
|
||||||
|
|
|
||||||
|
|
@ -686,7 +686,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// BroadcastBlock will either propagate a block to a subset of it's peers, or
|
// BroadcastBlock will either propagate a block to a subset of its peers, or
|
||||||
// will only announce it's availability (depending what's requested).
|
// will only announce it's availability (depending what's requested).
|
||||||
func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) {
|
func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) {
|
||||||
hash := block.Hash()
|
hash := block.Hash()
|
||||||
|
|
|
||||||
|
|
@ -956,7 +956,7 @@ var SolidityParam = require('./param');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats input value to byte representation of int
|
* Formats input value to byte representation of int
|
||||||
* If value is negative, return it's two's complement
|
* If value is negative, return its two's complement
|
||||||
* If the value is floating point, round it down
|
* If the value is floating point, round it down
|
||||||
*
|
*
|
||||||
* @method formatInputInt
|
* @method formatInputInt
|
||||||
|
|
@ -1058,7 +1058,7 @@ var signedIsNegative = function (value) {
|
||||||
var formatOutputInt = function (param) {
|
var formatOutputInt = function (param) {
|
||||||
var value = param.staticPart() || "0";
|
var value = param.staticPart() || "0";
|
||||||
|
|
||||||
// check if it's negative number
|
// check if it's a negative number
|
||||||
// it it is, return two's complement
|
// it it is, return two's complement
|
||||||
if (signedIsNegative(value)) {
|
if (signedIsNegative(value)) {
|
||||||
return new BigNumber(value, 16).minus(new BigNumber('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)).minus(1);
|
return new BigNumber(value, 16).minus(new BigNumber('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)).minus(1);
|
||||||
|
|
@ -1987,7 +1987,7 @@ var padRight = function (string, chars, sign) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should be called to get utf8 from it's hex representation
|
* Should be called to get utf8 from its hex representation
|
||||||
*
|
*
|
||||||
* @method toUtf8
|
* @method toUtf8
|
||||||
* @param {String} string in hex
|
* @param {String} string in hex
|
||||||
|
|
@ -2011,7 +2011,7 @@ var toUtf8 = function(hex) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should be called to get ascii from it's hex representation
|
* Should be called to get ascii from its hex representation
|
||||||
*
|
*
|
||||||
* @method toAscii
|
* @method toAscii
|
||||||
* @param {String} string in hex
|
* @param {String} string in hex
|
||||||
|
|
@ -2109,7 +2109,7 @@ var extractTypeName = function (name) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts value to it's decimal representation in string
|
* Converts value to its decimal representation in string
|
||||||
*
|
*
|
||||||
* @method toDecimal
|
* @method toDecimal
|
||||||
* @param {String|Number|BigNumber}
|
* @param {String|Number|BigNumber}
|
||||||
|
|
@ -2120,7 +2120,7 @@ var toDecimal = function (value) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts value to it's hex representation
|
* Converts value to its hex representation
|
||||||
*
|
*
|
||||||
* @method fromDecimal
|
* @method fromDecimal
|
||||||
* @param {String|Number|BigNumber}
|
* @param {String|Number|BigNumber}
|
||||||
|
|
@ -2134,7 +2134,7 @@ var fromDecimal = function (value) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Auto converts any given value into it's hex representation.
|
* Auto converts any given value into its hex representation.
|
||||||
*
|
*
|
||||||
* And even stringifys objects before.
|
* And even stringifys objects before.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -443,7 +443,7 @@ func (n *Node) stopWS() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop terminates a running node along with all it's services. In the node was
|
// Stop terminates a running node along with all its services. In the node was
|
||||||
// not started, an error is returned.
|
// not started, an error is returned.
|
||||||
func (n *Node) Stop() error {
|
func (n *Node) Stop() error {
|
||||||
n.lock.Lock()
|
n.lock.Lock()
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ func (t *BlockTest) InsertPreState(db ethdb.Database) (*state.StateDB, error) {
|
||||||
|
|
||||||
Since some tests mix valid and invalid blocks we need to check this for every block.
|
Since some tests mix valid and invalid blocks we need to check this for every block.
|
||||||
|
|
||||||
If a block is invalid it does not necessarily fail the test, if it's invalidness is
|
If a block is invalid it does not necessarily fail the test, if its invalidness is
|
||||||
expected we are expected to ignore it and continue processing and then validate the
|
expected we are expected to ignore it and continue processing and then validate the
|
||||||
post state.
|
post state.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue