Fix typos (#133)

* Fix typos

* revert chains/unit_testnet

* revert chains

* fix review comments (thx @AlexVanin)
This commit is contained in:
Evgeniy Kulikov 2019-02-13 21:01:10 +03:00 committed by decentralisedkev
parent 845d719698
commit 67cbcac643
25 changed files with 40 additions and 40 deletions

View file

@ -93,7 +93,7 @@ Available network flags:
- `--privnet, -p`
- `--testnet, -t`
If you want in-depth customization for your node, there are `yaml` config files for each `network` available in the `config` directory. Those files are automaticly loaded, corresponding the provided `netmode` flag.
If you want in-depth customization for your node, there are `yaml` config files for each `network` available in the `config` directory. Those files are automatically loaded, corresponding the provided `netmode` flag.
```yaml
ProtocolConfiguration:
@ -134,7 +134,7 @@ Feel free to contribute to this project after reading the
[contributing guidelines](https://github.com/CityOfZion/neo-go/blob/master/CONTRIBUTING.md).
Before starting to work on a certain topic, create an new issue first,
describing the feauture/topic you are going to implement.
describing the feature/topic you are going to implement.
# Contact

View file

@ -76,7 +76,7 @@ func createWallet(ctx *cli.Context) error {
}
dumpWallet(wall)
fmt.Printf("wallet succesfully created, file location is %s\n", wall.Path())
fmt.Printf("wallet successfully created, file location is %s\n", wall.Path())
return nil
}

View file

@ -37,7 +37,7 @@ type (
ApplicationConfiguration ApplicationConfiguration `yaml:"ApplicationConfiguration"`
}
// ProtocolConfiguration represents the protolcol config.
// ProtocolConfiguration represents the protocol config.
ProtocolConfiguration struct {
Magic NetMode `yaml:"Magic"`
AddressVersion int64 `yaml:"AddressVersion"`

View file

@ -17,7 +17,7 @@ var owner = util.FromAddress("AJX1jGfj3qPBbpAKjY527nPbnrnvSx9nCg")
type TokenConfig struct {
// Name of the token.
Name string
// 3 letter abreviation of the token.
// 3 letter abbreviation of the token.
Symbol string
// How decimals this token will have.
Decimals int

View file

@ -33,7 +33,7 @@ type BlockBase struct {
// Random number also called nonce
ConsensusData uint64 `json:"nonce"`
// Contract addresss of the next miner
// Contract address of the next miner
NextConsensus util.Uint160 `json:"next_consensus"`
// Padding that is fixed to 1

View file

@ -51,7 +51,7 @@ func (c *Cache) has(h util.Uint256) bool {
return ok
}
// Has returns whether the cach contains the given hash.
// Has returns whether the cache contains the given hash.
func (c *Cache) Has(h util.Uint256) bool {
c.lock.Lock()
defer c.lock.Unlock()

View file

@ -14,7 +14,7 @@ type Header struct {
_ uint8
}
// DecodeBinary impelements the Payload interface.
// DecodeBinary implements the Payload interface.
func (h *Header) DecodeBinary(r io.Reader) error {
if err := h.BlockBase.DecodeBinary(r); err != nil {
return err
@ -32,7 +32,7 @@ func (h *Header) DecodeBinary(r io.Reader) error {
return nil
}
// EncodeBinary impelements the Payload interface.
// EncodeBinary implements the Payload interface.
func (h *Header) EncodeBinary(w io.Writer) error {
if err := h.BlockBase.EncodeBinary(w); err != nil {
return err

View file

@ -6,7 +6,7 @@ import (
"github.com/syndtr/goleveldb/leveldb/util"
)
// LevelDBStore is the official storage implementation for storing and retreiving
// LevelDBStore is the official storage implementation for storing and retrieving
// blockchain data.
type LevelDBStore struct {
db *leveldb.DB

View file

@ -15,7 +15,7 @@ type Output struct {
// Amount of AssetType send or received.
Amount util.Fixed8
// The address of the remittee.
// The address of the recipient.
ScriptHash util.Uint160
}

View file

@ -43,6 +43,6 @@ func (t TXType) String() string {
case InvocationType:
return "InvocationTransaction"
default:
return "UnkownTransaction"
return "UnknownTransaction"
}
}

View file

@ -9,7 +9,7 @@ const (
)
// Discoverer is an interface that is responsible for maintaining
// a healty connection pool.
// a healthy connection pool.
type Discoverer interface {
BackFill(...string)
PoolCount() int

View file

@ -8,7 +8,7 @@ import (
)
// The node can broadcast the object information it owns by this message.
// The message can be sent automatically or can be used to answer getbloks messages.
// The message can be sent automatically or can be used to answer getblock messages.
// InventoryType is the type of an object in the Inventory message.
type InventoryType uint8

View file

@ -38,8 +38,8 @@ func (c *Client) GetAccountState(address string) (*AccountStateResponse, error)
return resp, nil
}
// InvokeScipt returns the result of the given script after running it true the VM.
// NOTE: This is a test invoke and will not affect the blokchain.
// InvokeScript returns the result of the given script after running it true the VM.
// NOTE: This is a test invoke and will not affect the blockchain.
func (c *Client) InvokeScript(script string) (*InvokeScriptResponse, error) {
var (
params = newParams(script)

View file

@ -53,7 +53,7 @@ func (s *Server) Start(errChan chan error) {
errChan <- s.ListenAndServe()
}
// Shutdown overrride the http.Server Shutdown
// Shutdown override the http.Server Shutdown
// method.
func (s *Server) Shutdown() error {
log.WithFields(log.Fields{

View file

@ -23,7 +23,7 @@ type AccountStateResponse struct {
Result *Account `json:"result"`
}
// Account respresents details about a NEO account.
// Account represents details about a NEO account.
type Account struct {
Version int `json:"version"`
ScriptHash string `json:"script_hash"`
@ -33,7 +33,7 @@ type Account struct {
Balances []*Balance
}
// Balance respresents details about a NEO account balance.
// Balance represents details about a NEO account balance.
type Balance struct {
Asset string `json:"asset"`
Value string `json:"value"`

View file

@ -18,7 +18,7 @@ func RandomString(n int) string {
return string(b)
}
// RandomInt returns a ramdom integer betweeen min and max.
// RandomInt returns a random integer between min and max.
func RandomInt(min, max int) int {
return min + rand.Intn(max-min)
}

View file

@ -15,7 +15,7 @@ func Notify(arg interface{}) int {
return 0
}
// Log intructs the VM to log the given message.
// Log instructs the VM to log the given message.
func Log(message string) {}
// Application returns the application trigger type.
@ -39,7 +39,7 @@ func Serialize(item interface{}) []byte {
return nil
}
// Deserializes an item from a bytearray.
// Deserialize an item from a bytearray.
func Deserialize(b []byte) interface{} {
return nil
}

View file

@ -15,5 +15,5 @@ func Get(ctx interface{}, key interface{}) interface{} { return 0 }
// Delete removes a stored key value pair.
func Delete(ctx interface{}, key interface{}) {}
// Find entrys somewhat matching the given key.
// Find entries somewhat matching the given key.
func Find(ctx interface{}, key interface{}) interface{} { return 0 }

View file

@ -19,7 +19,7 @@ import (
// command describes a VM command.
type command struct {
// number of minimun arguments the command needs.
// number of minimum arguments the command needs.
args int
// description of the command.
usage string

View file

@ -53,11 +53,11 @@ func typeAndValueForField(fld *types.Var) types.TypeAndValue {
}
// countGlobals counts the global variables in the program to add
// them with the stacksize of the function.
// them with the stack size of the function.
func countGlobals(f ast.Node) (i int64) {
ast.Inspect(f, func(node ast.Node) bool {
switch node.(type) {
// Skip all functio declarations.
// Skip all function declarations.
case *ast.FuncDecl:
return false
// After skipping all funcDecls we are sure that each value spec

View file

@ -162,7 +162,7 @@ func (c *codegen) convertFuncDecl(file ast.Node, decl *ast.FuncDecl) {
// The method receiver will be passed in as first argument.
// We check if this declaration has a receiver and load it into scope.
//
// FIXME: For now we will hard cast this to a struct. We can later finetune this
// FIXME: For now we will hard cast this to a struct. We can later fine tune this
// to support other types.
if decl.Recv != nil {
for _, arg := range decl.Recv.List {
@ -356,7 +356,7 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
// The AST package will try to resolve all basic literals for us.
// If the typeinfo.Value is not nil we know that the expr is resolved
// and needs no further action. e.g. x := 2 + 2 + 2 will be resolved to 6.
// NOTE: Constants will also be automagically resolved be the AST parser.
// NOTE: Constants will also be automatically resolved be the AST parser.
// example:
// const x = 10
// x + 2 will results into 12
@ -570,8 +570,8 @@ func (c *codegen) convertBuiltin(expr *ast.CallExpr) {
emitOpcode(c.prog, vm.Ohash160)
case "FromAddress":
// We can be sure that this is a ast.BasicLit just containing a simple
// address string. Note that the string returned from callin Value will
// contain double qoutes that need to be stripped.
// address string. Note that the string returned from calling Value will
// contain double quotes that need to be stripped.
addressStr := expr.Args[0].(*ast.BasicLit).Value
addressStr = strings.Replace(addressStr, "\"", "", 2)
uint160, err := crypto.Uint160DecodeAddress(addressStr)
@ -720,7 +720,7 @@ func CodeGen(info *buildInfo) (*bytes.Buffer, error) {
for _, decl := range f.Decls {
switch n := decl.(type) {
case *ast.FuncDecl:
// Dont convert the function if its not used. This will save alot
// Dont convert the function if its not used. This will save a lot
// of bytecode space.
if n.Name.Name != mainIdent && funUsage.funcUsed(n.Name.Name) {
c.convertFuncDecl(f, n)

View file

@ -58,7 +58,7 @@ func (e *Element) Prev() *Element {
}
// BigInt attempts to get the underlying value of the element as a big integer.
// Will panic if the assertion failed which will be catched by the VM.
// Will panic if the assertion failed which will be caught by the VM.
func (e *Element) BigInt() *big.Int {
switch t := e.value.(type) {
case *BigIntegerItem:
@ -70,7 +70,7 @@ func (e *Element) BigInt() *big.Int {
}
// Bool attempts to get the underlying value of the element as a boolean.
// Will panic if the assertion failed which will be catched by the VM.
// Will panic if the assertion failed which will be caught by the VM.
func (e *Element) Bool() bool {
if v, ok := e.value.Value().(*big.Int); ok {
return v.Int64() == 1
@ -79,7 +79,7 @@ func (e *Element) Bool() bool {
}
// Bytes attempts to get the underlying value of the element as a byte array.
// Will panic if the assertion failed which will be catched by the VM.
// Will panic if the assertion failed which will be caught by the VM.
func (e *Element) Bytes() []byte {
return e.value.Value().([]byte)
}

View file

@ -66,7 +66,7 @@ func (v *VM) RegisterInteropFunc(name string, f InteropFunc) {
v.interop[name] = f
}
// Estack will return the evalutation stack so interop hooks can utilize this.
// Estack will return the evaluation stack so interop hooks can utilize this.
func (v *VM) Estack() *Stack {
return v.estack
}
@ -295,7 +295,7 @@ func (v *VM) execute(ctx *Context, op Opcode) {
panic("XSWAP: invalid length")
}
// Swap values of elements instead of reordening stack elements.
// Swap values of elements instead of reordering stack elements.
if n > 0 {
a := v.estack.Peek(n)
b := v.estack.Peek(0)

View file

@ -14,7 +14,7 @@ type Account struct {
// Account import file.
wif string
// NEO public addresss.
// NEO public address.
Address string `json:"address"`
// Encrypted WIF of the account also known as the key.
@ -35,7 +35,7 @@ type Account struct {
Default bool `json:"isDefault"`
}
// Contract represents a subset of the smartcontract to embedd in the
// Contract represents a subset of the smartcontract to embed in the
// Account so it's NEP-6 compliant.
type Contract struct {
// Script hash of the contract deployed on the blockchain.

View file

@ -11,7 +11,7 @@ const (
walletVersion = "1.0"
)
// Wallet respresents a NEO (NEP-2, NEP-6) compliant wallet.
// Wallet represents a NEO (NEP-2, NEP-6) compliant wallet.
type Wallet struct {
// Version of the wallet, used for later upgrades.
Version string `json:"version"`
@ -72,7 +72,7 @@ func newWallet(rw io.ReadWriter) *Wallet {
}
}
// CreatAccount generates a new account for the end user and ecrypts
// CreatAccount generates a new account for the end user and encrypts
// the private key with the given passphrase.
func (w *Wallet) CreateAccount(name, passphrase string) error {
acc, err := NewAccount()