[rpc] Fix lint

pull/3389/head
Janet Liang 4 years ago
parent 346a5dda7c
commit 9737ca0b21
  1. 10
      hmy/tracer.go
  2. 2
      rpc/rpc.go
  3. 2
      rpc/tracer.go

@ -20,7 +20,6 @@ import (
"bufio"
"context"
"fmt"
"github.com/ethereum/go-ethereum/common/math"
"io/ioutil"
"os"
"runtime"
@ -29,6 +28,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/trie"
"github.com/harmony-one/harmony/core"
@ -142,7 +142,7 @@ func (hmy *Harmony) TraceChain(ctx context.Context, start, end *types.Block, con
}
// Execute all the transactions contained within the chain concurrently for each block
blocks := int(end.NumberU64()-origin)
blocks := int(end.NumberU64() - origin)
threads := runtime.NumCPU()
if threads > blocks {
@ -632,10 +632,10 @@ func (hmy *Harmony) TraceTx(ctx context.Context, message core.Message, vmctx vm.
switch tracer := tracer.(type) {
case *vm.StructLogger:
return &ExecutionResult{
Gas: result.UsedGas,
Failed: result.VMErr != nil,
Gas: result.UsedGas,
Failed: result.VMErr != nil,
ReturnValue: fmt.Sprintf("%x", result.ReturnData),
StructLogs: FormatLogs(tracer.StructLogs()),
StructLogs: FormatLogs(tracer.StructLogs()),
}, nil
default:

@ -16,7 +16,7 @@ import (
// Version enum
const (
V1 Version = iota
V1 Version = iota
V2
Debug
)

@ -21,7 +21,6 @@ import (
"context"
"errors"
"fmt"
"github.com/harmony-one/harmony/hmy"
"time"
"github.com/ethereum/go-ethereum/common"
@ -30,6 +29,7 @@ import (
"github.com/harmony-one/harmony/core"
"github.com/harmony-one/harmony/core/rawdb"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/hmy"
)
const (

Loading…
Cancel
Save