This commit is contained in:
Cyrus 2024-03-07 12:45:30 +08:00
parent aadcb88675
commit 3658ad87cb
8 changed files with 9 additions and 9 deletions

View file

@ -242,7 +242,7 @@ func readInput(ctx *cli.Context) (*bbInput, error) {
if headerStr == stdinSelector || ommersStr == stdinSelector || txsStr == stdinSelector || cliqueStr == stdinSelector {
decoder := json.NewDecoder(os.Stdin)
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 != "" {

View file

@ -86,7 +86,7 @@ func Transaction(ctx *cli.Context) error {
if txStr == stdinSelector {
decoder := json.NewDecoder(os.Stdin)
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
body = common.FromHex(inputData.TxRlp)

View file

@ -135,7 +135,7 @@ func Transition(ctx *cli.Context) error {
if allocStr == stdinSelector || envStr == stdinSelector || txStr == stdinSelector {
decoder := json.NewDecoder(os.Stdin)
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 {

View file

@ -127,7 +127,7 @@ func loadTransactions(txStr string, inputData *input, env stEnv, chainConfig *pa
return newRlpTxIterator(body), 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 {
if len(inputData.TxRlp) > 0 {

View file

@ -33,7 +33,7 @@ func readFile(path, desc string, dest interface{}) error {
defer inFile.Close()
decoder := json.NewDecoder(inFile)
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
}

View file

@ -52,7 +52,7 @@ type accountMarshaling struct {
}
// storageJSON represents a 256 bit byte array, but allows less than 256 bits when
// unmarshaling from hex.
// unmarshalling from hex.
type storageJSON common.Hash
func (h *storageJSON) UnmarshalText(text []byte) error {

View file

@ -343,7 +343,7 @@ func TestReceiptJSON(t *testing.T) {
r := Receipt{}
err = r.UnmarshalJSON(b)
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{}
err = r2.UnmarshalJSON(b)
if err != nil {
t.Fatal("error unmarshaling receipt from json:", err)
t.Fatal("error unmarshalling receipt from json:", err)
}
}

View file

@ -70,7 +70,7 @@ type BatchElem struct {
// discarded.
Result interface{}
// 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
}