mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
fix typo
This commit is contained in:
parent
aadcb88675
commit
3658ad87cb
8 changed files with 9 additions and 9 deletions
|
|
@ -242,7 +242,7 @@ func readInput(ctx *cli.Context) (*bbInput, error) {
|
||||||
if headerStr == stdinSelector || ommersStr == stdinSelector || txsStr == stdinSelector || cliqueStr == stdinSelector {
|
if headerStr == stdinSelector || ommersStr == stdinSelector || txsStr == stdinSelector || cliqueStr == stdinSelector {
|
||||||
decoder := json.NewDecoder(os.Stdin)
|
decoder := json.NewDecoder(os.Stdin)
|
||||||
if err := decoder.Decode(inputData); err != nil {
|
if err := decoder.Decode(inputData); err != nil {
|
||||||
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshaling stdin: %v", err))
|
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshalling stdin: %v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if cliqueStr != stdinSelector && cliqueStr != "" {
|
if cliqueStr != stdinSelector && cliqueStr != "" {
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ func Transaction(ctx *cli.Context) error {
|
||||||
if txStr == stdinSelector {
|
if txStr == stdinSelector {
|
||||||
decoder := json.NewDecoder(os.Stdin)
|
decoder := json.NewDecoder(os.Stdin)
|
||||||
if err := decoder.Decode(inputData); err != nil {
|
if err := decoder.Decode(inputData); err != nil {
|
||||||
return NewError(ErrorJson, fmt.Errorf("failed unmarshaling stdin: %v", err))
|
return NewError(ErrorJson, fmt.Errorf("failed unmarshalling stdin: %v", err))
|
||||||
}
|
}
|
||||||
// Decode the body of already signed transactions
|
// Decode the body of already signed transactions
|
||||||
body = common.FromHex(inputData.TxRlp)
|
body = common.FromHex(inputData.TxRlp)
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ func Transition(ctx *cli.Context) error {
|
||||||
if allocStr == stdinSelector || envStr == stdinSelector || txStr == stdinSelector {
|
if allocStr == stdinSelector || envStr == stdinSelector || txStr == stdinSelector {
|
||||||
decoder := json.NewDecoder(os.Stdin)
|
decoder := json.NewDecoder(os.Stdin)
|
||||||
if err := decoder.Decode(inputData); err != nil {
|
if err := decoder.Decode(inputData); err != nil {
|
||||||
return NewError(ErrorJson, fmt.Errorf("failed unmarshaling stdin: %v", err))
|
return NewError(ErrorJson, fmt.Errorf("failed unmarshalling stdin: %v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if allocStr != stdinSelector {
|
if allocStr != stdinSelector {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ func loadTransactions(txStr string, inputData *input, env stEnv, chainConfig *pa
|
||||||
return newRlpTxIterator(body), nil
|
return newRlpTxIterator(body), nil
|
||||||
}
|
}
|
||||||
if err := json.Unmarshal(data, &txsWithKeys); err != nil {
|
if err := json.Unmarshal(data, &txsWithKeys); err != nil {
|
||||||
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshaling txs-file: %v", err))
|
return nil, NewError(ErrorJson, fmt.Errorf("failed unmarshalling txs-file: %v", err))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if len(inputData.TxRlp) > 0 {
|
if len(inputData.TxRlp) > 0 {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ func readFile(path, desc string, dest interface{}) error {
|
||||||
defer inFile.Close()
|
defer inFile.Close()
|
||||||
decoder := json.NewDecoder(inFile)
|
decoder := json.NewDecoder(inFile)
|
||||||
if err := decoder.Decode(dest); err != nil {
|
if err := decoder.Decode(dest); err != nil {
|
||||||
return NewError(ErrorJson, fmt.Errorf("failed unmarshaling %s file: %v", desc, err))
|
return NewError(ErrorJson, fmt.Errorf("failed unmarshalling %s file: %v", desc, err))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ type accountMarshaling struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// storageJSON represents a 256 bit byte array, but allows less than 256 bits when
|
// storageJSON represents a 256 bit byte array, but allows less than 256 bits when
|
||||||
// unmarshaling from hex.
|
// unmarshalling from hex.
|
||||||
type storageJSON common.Hash
|
type storageJSON common.Hash
|
||||||
|
|
||||||
func (h *storageJSON) UnmarshalText(text []byte) error {
|
func (h *storageJSON) UnmarshalText(text []byte) error {
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ func TestReceiptJSON(t *testing.T) {
|
||||||
r := Receipt{}
|
r := Receipt{}
|
||||||
err = r.UnmarshalJSON(b)
|
err = r.UnmarshalJSON(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("error unmarshaling receipt from json:", err)
|
t.Fatal("error unmarshalling receipt from json:", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -360,7 +360,7 @@ func TestEffectiveGasPriceNotRequired(t *testing.T) {
|
||||||
r2 := Receipt{}
|
r2 := Receipt{}
|
||||||
err = r2.UnmarshalJSON(b)
|
err = r2.UnmarshalJSON(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("error unmarshaling receipt from json:", err)
|
t.Fatal("error unmarshalling receipt from json:", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ type BatchElem struct {
|
||||||
// discarded.
|
// discarded.
|
||||||
Result interface{}
|
Result interface{}
|
||||||
// Error is set if the server returns an error for this request, or if
|
// Error is set if the server returns an error for this request, or if
|
||||||
// unmarshaling into Result fails. It is not set for I/O errors.
|
// unmarshalling into Result fails. It is not set for I/O errors.
|
||||||
Error error
|
Error error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue