Browse Source

alias amino imports (#3219)

As per conversation here: https://github.com/tendermint/tendermint/pull/3218#discussion_r251364041

This is the result of running the following code on the repo:

```bash
find . -name '*.go' | grep -v 'vendor/' | xargs -n 1 goimports -w
```
pull/3220/head
Thane Thomson 6 years ago
committed by Anton Kaliaev
parent
commit
a335caaedb
38 changed files with 47 additions and 47 deletions
  1. +1
    -1
      benchmarks/codec_test.go
  2. +1
    -1
      blockchain/wire.go
  3. +1
    -1
      cmd/tendermint/commands/wire.go
  4. +4
    -4
      consensus/reactor.go
  5. +1
    -1
      consensus/reactor_test.go
  6. +1
    -0
      consensus/replay.go
  7. +1
    -1
      consensus/state.go
  8. +1
    -1
      consensus/types/round_state_test.go
  9. +1
    -0
      consensus/wal_test.go
  10. +1
    -1
      consensus/wire.go
  11. +1
    -1
      crypto/merkle/proof_test.go
  12. +1
    -1
      crypto/merkle/wire.go
  13. +1
    -1
      evidence/wire.go
  14. +1
    -1
      mempool/wire.go
  15. +1
    -1
      node/node.go
  16. +1
    -1
      p2p/conn/wire.go
  17. +1
    -1
      p2p/pex/wire.go
  18. +1
    -1
      p2p/wire.go
  19. +1
    -1
      privval/remote_signer.go
  20. +1
    -1
      privval/wire.go
  21. +1
    -1
      rpc/client/rpc_test.go
  22. +1
    -1
      rpc/core/types/wire.go
  23. +2
    -2
      rpc/grpc/grpc_test.go
  24. +1
    -2
      rpc/lib/client/args_test.go
  25. +1
    -1
      rpc/lib/client/http_client.go
  26. +1
    -1
      rpc/lib/client/ws_client.go
  27. +1
    -1
      rpc/lib/types/types_test.go
  28. +1
    -1
      scripts/json2wal/main.go
  29. +1
    -1
      scripts/wal2json/main.go
  30. +1
    -1
      state/txindex/kv/wire.go
  31. +1
    -1
      state/wire.go
  32. +1
    -1
      tools/tm-monitor/mock/eventmeter.go
  33. +1
    -1
      tools/tm-monitor/monitor/monitor.go
  34. +1
    -1
      tools/tm-monitor/monitor/monitor_test.go
  35. +6
    -6
      tools/tm-monitor/monitor/node.go
  36. +1
    -2
      types/protobuf_test.go
  37. +1
    -1
      types/tx.go
  38. +1
    -1
      types/wire.go

+ 1
- 1
benchmarks/codec_test.go View File

@ -4,7 +4,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
proto "github.com/tendermint/tendermint/benchmarks/proto" proto "github.com/tendermint/tendermint/benchmarks/proto"
"github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/ed25519"


+ 1
- 1
blockchain/wire.go View File

@ -1,7 +1,7 @@
package blockchain package blockchain
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
) )


+ 1
- 1
cmd/tendermint/commands/wire.go View File

@ -1,7 +1,7 @@
package commands package commands
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
) )


+ 4
- 4
consensus/reactor.go View File

@ -8,7 +8,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cstypes "github.com/tendermint/tendermint/consensus/types" cstypes "github.com/tendermint/tendermint/consensus/types"
cmn "github.com/tendermint/tendermint/libs/common" cmn "github.com/tendermint/tendermint/libs/common"
tmevents "github.com/tendermint/tendermint/libs/events" tmevents "github.com/tendermint/tendermint/libs/events"
@ -438,9 +438,9 @@ func (conR *ConsensusReactor) broadcastHasVoteMessage(vote *types.Vote) {
func makeRoundStepMessage(rs *cstypes.RoundState) (nrsMsg *NewRoundStepMessage) { func makeRoundStepMessage(rs *cstypes.RoundState) (nrsMsg *NewRoundStepMessage) {
nrsMsg = &NewRoundStepMessage{ nrsMsg = &NewRoundStepMessage{
Height: rs.Height,
Round: rs.Round,
Step: rs.Step,
Height: rs.Height,
Round: rs.Round,
Step: rs.Step,
SecondsSinceStartTime: int(time.Since(rs.StartTime).Seconds()), SecondsSinceStartTime: int(time.Since(rs.StartTime).Seconds()),
LastCommitRound: rs.LastCommit.Round(), LastCommitRound: rs.LastCommit.Round(),
} }


+ 1
- 1
consensus/reactor_test.go View File

@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/abci/client"
abcicli "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/abci/example/kvstore"
abci "github.com/tendermint/tendermint/abci/types" abci "github.com/tendermint/tendermint/abci/types"
bc "github.com/tendermint/tendermint/blockchain" bc "github.com/tendermint/tendermint/blockchain"


+ 1
- 0
consensus/replay.go View File

@ -6,6 +6,7 @@ import (
"hash/crc32" "hash/crc32"
"io" "io"
"reflect" "reflect"
//"strconv" //"strconv"
//"strings" //"strings"
"time" "time"


+ 1
- 1
consensus/state.go View File

@ -94,7 +94,7 @@ type ConsensusState struct {
// internal state // internal state
mtx sync.RWMutex mtx sync.RWMutex
cstypes.RoundState cstypes.RoundState
state sm.State // State until height-1.
state sm.State // State until height-1.
// state changes may be triggered by: msgs from peers, // state changes may be triggered by: msgs from peers,
// msgs from ourself, or by timeouts // msgs from ourself, or by timeouts


+ 1
- 1
consensus/types/round_state_test.go View File

@ -3,7 +3,7 @@ package types
import ( import (
"testing" "testing"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/ed25519"
cmn "github.com/tendermint/tendermint/libs/common" cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"


+ 1
- 0
consensus/wal_test.go View File

@ -7,6 +7,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
// "sync" // "sync"
"testing" "testing"
"time" "time"


+ 1
- 1
consensus/wire.go View File

@ -1,7 +1,7 @@
package consensus package consensus
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
) )


+ 1
- 1
crypto/merkle/proof_test.go View File

@ -4,7 +4,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cmn "github.com/tendermint/tendermint/libs/common" cmn "github.com/tendermint/tendermint/libs/common"
) )


+ 1
- 1
crypto/merkle/wire.go View File

@ -1,7 +1,7 @@
package merkle package merkle
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
) )
var cdc *amino.Codec var cdc *amino.Codec


+ 1
- 1
evidence/wire.go View File

@ -1,7 +1,7 @@
package evidence package evidence
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
) )


+ 1
- 1
mempool/wire.go View File

@ -1,7 +1,7 @@
package mempool package mempool
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
) )
var cdc = amino.NewCodec() var cdc = amino.NewCodec()


+ 1
- 1
node/node.go View File

@ -34,7 +34,7 @@ import (
rpccore "github.com/tendermint/tendermint/rpc/core" rpccore "github.com/tendermint/tendermint/rpc/core"
ctypes "github.com/tendermint/tendermint/rpc/core/types" ctypes "github.com/tendermint/tendermint/rpc/core/types"
grpccore "github.com/tendermint/tendermint/rpc/grpc" grpccore "github.com/tendermint/tendermint/rpc/grpc"
"github.com/tendermint/tendermint/rpc/lib/server"
rpcserver "github.com/tendermint/tendermint/rpc/lib/server"
sm "github.com/tendermint/tendermint/state" sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/state/txindex" "github.com/tendermint/tendermint/state/txindex"
"github.com/tendermint/tendermint/state/txindex/kv" "github.com/tendermint/tendermint/state/txindex/kv"


+ 1
- 1
p2p/conn/wire.go View File

@ -1,7 +1,7 @@
package conn package conn
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
) )


+ 1
- 1
p2p/pex/wire.go View File

@ -1,7 +1,7 @@
package pex package pex
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
) )
var cdc *amino.Codec = amino.NewCodec() var cdc *amino.Codec = amino.NewCodec()


+ 1
- 1
p2p/wire.go View File

@ -1,7 +1,7 @@
package p2p package p2p
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
) )


+ 1
- 1
privval/remote_signer.go View File

@ -7,7 +7,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto"
cmn "github.com/tendermint/tendermint/libs/common" cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"


+ 1
- 1
privval/wire.go View File

@ -1,7 +1,7 @@
package privval package privval
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
) )


+ 1
- 1
rpc/client/rpc_test.go View File

@ -12,7 +12,7 @@ import (
abci "github.com/tendermint/tendermint/abci/types" abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/client"
"github.com/tendermint/tendermint/rpc/test"
rpctest "github.com/tendermint/tendermint/rpc/test"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
) )


+ 1
- 1
rpc/core/types/wire.go View File

@ -1,7 +1,7 @@
package core_types package core_types
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
) )


+ 2
- 2
rpc/grpc/grpc_test.go View File

@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/abci/example/kvstore"
"github.com/tendermint/tendermint/rpc/grpc"
"github.com/tendermint/tendermint/rpc/test"
core_grpc "github.com/tendermint/tendermint/rpc/grpc"
rpctest "github.com/tendermint/tendermint/rpc/test"
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {


+ 1
- 2
rpc/lib/client/args_test.go View File

@ -5,8 +5,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
) )
type Tx []byte type Tx []byte


+ 1
- 1
rpc/lib/client/http_client.go View File

@ -12,7 +12,7 @@ import (
"strings" "strings"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
types "github.com/tendermint/tendermint/rpc/lib/types" types "github.com/tendermint/tendermint/rpc/lib/types"
) )


+ 1
- 1
rpc/lib/client/ws_client.go View File

@ -13,7 +13,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
metrics "github.com/rcrowley/go-metrics" metrics "github.com/rcrowley/go-metrics"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cmn "github.com/tendermint/tendermint/libs/common" cmn "github.com/tendermint/tendermint/libs/common"
types "github.com/tendermint/tendermint/rpc/lib/types" types "github.com/tendermint/tendermint/rpc/lib/types"
) )


+ 1
- 1
rpc/lib/types/types_test.go View File

@ -8,7 +8,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
) )
type SampleResult struct { type SampleResult struct {


+ 1
- 1
scripts/json2wal/main.go View File

@ -14,7 +14,7 @@ import (
"os" "os"
"strings" "strings"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cs "github.com/tendermint/tendermint/consensus" cs "github.com/tendermint/tendermint/consensus"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
) )


+ 1
- 1
scripts/wal2json/main.go View File

@ -12,7 +12,7 @@ import (
"io" "io"
"os" "os"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cs "github.com/tendermint/tendermint/consensus" cs "github.com/tendermint/tendermint/consensus"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
) )


+ 1
- 1
state/txindex/kv/wire.go View File

@ -1,7 +1,7 @@
package kv package kv
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
) )
var cdc = amino.NewCodec() var cdc = amino.NewCodec()


+ 1
- 1
state/wire.go View File

@ -1,7 +1,7 @@
package state package state
import ( import (
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino" cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
) )


+ 1
- 1
tools/tm-monitor/mock/eventmeter.go View File

@ -4,7 +4,7 @@ import (
stdlog "log" stdlog "log"
"reflect" "reflect"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/log"
em "github.com/tendermint/tendermint/tools/tm-monitor/eventmeter" em "github.com/tendermint/tendermint/tools/tm-monitor/eventmeter"
) )


+ 1
- 1
tools/tm-monitor/monitor/monitor.go View File

@ -46,7 +46,7 @@ func NewMonitor(options ...func(*Monitor)) *Monitor {
nodeQuit: make(map[string]chan struct{}), nodeQuit: make(map[string]chan struct{}),
recalculateNetworkUptimeEvery: 10 * time.Second, recalculateNetworkUptimeEvery: 10 * time.Second,
numValidatorsUpdateInterval: 5 * time.Second, numValidatorsUpdateInterval: 5 * time.Second,
logger: log.NewNopLogger(),
logger: log.NewNopLogger(),
} }
for _, option := range options { for _, option := range options {


+ 1
- 1
tools/tm-monitor/monitor/monitor_test.go View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/ed25519"
ctypes "github.com/tendermint/tendermint/rpc/core/types" ctypes "github.com/tendermint/tendermint/rpc/core/types"
mock "github.com/tendermint/tendermint/tools/tm-monitor/mock" mock "github.com/tendermint/tendermint/tools/tm-monitor/mock"


+ 6
- 6
tools/tm-monitor/monitor/node.go View File

@ -55,13 +55,13 @@ func NewNode(rpcAddr string, options ...func(*Node)) *Node {
func NewNodeWithEventMeterAndRpcClient(rpcAddr string, em eventMeter, rpcClient rpc_client.HTTPClient, options ...func(*Node)) *Node { func NewNodeWithEventMeterAndRpcClient(rpcAddr string, em eventMeter, rpcClient rpc_client.HTTPClient, options ...func(*Node)) *Node {
n := &Node{ n := &Node{
rpcAddr: rpcAddr,
em: em,
rpcClient: rpcClient,
Name: rpcAddr,
quit: make(chan struct{}),
rpcAddr: rpcAddr,
em: em,
rpcClient: rpcClient,
Name: rpcAddr,
quit: make(chan struct{}),
checkIsValidatorInterval: 5 * time.Second, checkIsValidatorInterval: 5 * time.Second,
logger: log.NewNopLogger(),
logger: log.NewNopLogger(),
} }
for _, option := range options { for _, option := range options {


+ 1
- 2
types/protobuf_test.go View File

@ -7,8 +7,7 @@ import (
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
abci "github.com/tendermint/tendermint/abci/types" abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/ed25519"


+ 1
- 1
types/tx.go View File

@ -5,7 +5,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
abci "github.com/tendermint/tendermint/abci/types" abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/merkle" "github.com/tendermint/tendermint/crypto/merkle"


+ 1
- 1
types/wire.go View File

@ -2,7 +2,7 @@ package types
import ( import (
amino "github.com/tendermint/go-amino" amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/crypto/encoding/amino"
cryptoAmino "github.com/tendermint/tendermint/crypto/encoding/amino"
) )
var cdc = amino.NewCodec() var cdc = amino.NewCodec()


Loading…
Cancel
Save