Browse Source

libs/time: move types/time into libs (#6595)

pull/6599/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
a6b30faf35
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 27 additions and 27 deletions
  1. +2
    -2
      CHANGELOG_PENDING.md
  2. +1
    -1
      cmd/tendermint/commands/init.go
  3. +1
    -1
      cmd/tendermint/commands/testnet.go
  4. +1
    -1
      internal/consensus/common_test.go
  5. +1
    -1
      internal/consensus/peer_state.go
  6. +1
    -1
      internal/consensus/state.go
  7. +1
    -1
      internal/consensus/types/height_vote_set_test.go
  8. +1
    -1
      internal/consensus/wal.go
  9. +1
    -1
      internal/consensus/wal_test.go
  10. +1
    -1
      internal/test/factory/genesis.go
  11. +0
    -0
      libs/time/time.go
  12. +0
    -0
      libs/time/time_test.go
  13. +1
    -1
      light/helpers_test.go
  14. +1
    -1
      node/node.go
  15. +1
    -1
      node/node_test.go
  16. +1
    -1
      privval/file.go
  17. +1
    -1
      privval/file_test.go
  18. +1
    -1
      state/execution_test.go
  19. +1
    -1
      state/helpers_test.go
  20. +1
    -1
      state/state.go
  21. +1
    -1
      state/validation_test.go
  22. +1
    -1
      store/store_test.go
  23. +1
    -1
      types/block_test.go
  24. +1
    -1
      types/canonical.go
  25. +1
    -1
      types/genesis.go
  26. +1
    -1
      types/genesis_test.go
  27. +1
    -1
      types/proposal.go
  28. +1
    -1
      types/vote_set_test.go

+ 2
- 2
CHANGELOG_PENDING.md View File

@ -32,8 +32,8 @@ Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermi
- P2P Protocol
- Go API
- [libs/log] \#6534 Removed the existing custom Tendermint logger backed by go-kit. The logging interface, `Logger`, remains.
Tendermint still provides a default logger backed by the performant zerolog logger. (@alexanderbez)
- [libs/time] \#6495 Move types/time to libs/time to improve consistency. (@tychoish)
- [libs/log] \#6534 Removed the existing custom Tendermint logger backed by go-kit. The logging interface, `Logger`, remains. Tendermint still provides a default logger backed by the performant zerolog logger. (@alexanderbez)
- [mempool] \#6529 The `Context` field has been removed from the `TxInfo` type. `CheckTx` now requires a `Context` argument. (@alexanderbez)
- [abci/client, proxy] \#5673 `Async` funcs return an error, `Sync` and `Async` funcs accept `context.Context` (@melekes)
- [p2p] Removed unused function `MakePoWTarget`. (@erikgrinaker)


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

@ -11,9 +11,9 @@ import (
"github.com/tendermint/tendermint/internal/p2p"
tmos "github.com/tendermint/tendermint/libs/os"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
"github.com/tendermint/tendermint/privval"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
// InitFilesCmd initializes a fresh Tendermint Core instance.


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

@ -15,9 +15,9 @@ import (
"github.com/tendermint/tendermint/internal/p2p"
"github.com/tendermint/tendermint/libs/bytes"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
"github.com/tendermint/tendermint/privval"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
var (


+ 1
- 1
internal/consensus/common_test.go View File

@ -31,12 +31,12 @@ import (
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
tmtime "github.com/tendermint/tendermint/libs/time"
"github.com/tendermint/tendermint/privval"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/store"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
const (


+ 1
- 1
internal/consensus/peer_state.go View File

@ -12,9 +12,9 @@ import (
"github.com/tendermint/tendermint/libs/bits"
tmjson "github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/libs/log"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
var (


+ 1
- 1
internal/consensus/state.go View File

@ -24,10 +24,10 @@ import (
tmmath "github.com/tendermint/tendermint/libs/math"
tmos "github.com/tendermint/tendermint/libs/os"
"github.com/tendermint/tendermint/libs/service"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
// Consensus sentinel errors


+ 1
- 1
internal/consensus/types/height_vote_set_test.go View File

@ -10,9 +10,9 @@ import (
"github.com/tendermint/tendermint/crypto/tmhash"
"github.com/tendermint/tendermint/internal/test/factory"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
var config *cfg.Config // NOTE: must be reset for each _test.go file


+ 1
- 1
internal/consensus/wal.go View File

@ -16,8 +16,8 @@ import (
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
"github.com/tendermint/tendermint/libs/service"
tmtime "github.com/tendermint/tendermint/libs/time"
tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus"
tmtime "github.com/tendermint/tendermint/types/time"
)
const (


+ 1
- 1
internal/consensus/wal_test.go View File

@ -16,8 +16,8 @@ import (
"github.com/tendermint/tendermint/internal/consensus/types"
"github.com/tendermint/tendermint/internal/libs/autofile"
"github.com/tendermint/tendermint/libs/log"
tmtime "github.com/tendermint/tendermint/libs/time"
tmtypes "github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
const (


+ 1
- 1
internal/test/factory/genesis.go View File

@ -4,8 +4,8 @@ import (
"sort"
cfg "github.com/tendermint/tendermint/config"
tmtime "github.com/tendermint/tendermint/libs/time"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
func RandGenesisDoc(


types/time/time.go → libs/time/time.go View File


types/time/time_test.go → libs/time/time_test.go View File


+ 1
- 1
light/helpers_test.go View File

@ -6,9 +6,9 @@ import (
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/tmhash"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
"github.com/tendermint/tendermint/version"
)


+ 1
- 1
node/node.go View File

@ -28,6 +28,7 @@ import (
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
"github.com/tendermint/tendermint/libs/service"
"github.com/tendermint/tendermint/libs/strings"
tmtime "github.com/tendermint/tendermint/libs/time"
"github.com/tendermint/tendermint/light"
"github.com/tendermint/tendermint/privval"
tmgrpc "github.com/tendermint/tendermint/privval/grpc"
@ -39,7 +40,6 @@ import (
"github.com/tendermint/tendermint/state/indexer"
"github.com/tendermint/tendermint/store"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
// nodeImpl is the highest level interface to a full Tendermint node.


+ 1
- 1
node/node_test.go View File

@ -28,13 +28,13 @@ import (
"github.com/tendermint/tendermint/internal/test/factory"
"github.com/tendermint/tendermint/libs/log"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
"github.com/tendermint/tendermint/privval"
"github.com/tendermint/tendermint/proxy"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/state/indexer"
"github.com/tendermint/tendermint/store"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
func TestNodeStartStop(t *testing.T) {


+ 1
- 1
privval/file.go View File

@ -18,9 +18,9 @@ import (
tmbytes "github.com/tendermint/tendermint/libs/bytes"
tmjson "github.com/tendermint/tendermint/libs/json"
tmos "github.com/tendermint/tendermint/libs/os"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
// TODO: type ?


+ 1
- 1
privval/file_test.go View File

@ -16,9 +16,9 @@ import (
"github.com/tendermint/tendermint/crypto/tmhash"
tmjson "github.com/tendermint/tendermint/libs/json"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
func TestGenLoadValidator(t *testing.T) {


+ 1
- 1
state/execution_test.go View File

@ -16,13 +16,13 @@ import (
"github.com/tendermint/tendermint/crypto/tmhash"
mmock "github.com/tendermint/tendermint/internal/mempool/mock"
"github.com/tendermint/tendermint/libs/log"
tmtime "github.com/tendermint/tendermint/libs/time"
"github.com/tendermint/tendermint/proxy"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/state/mocks"
sf "github.com/tendermint/tendermint/state/test/factory"
"github.com/tendermint/tendermint/store"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
"github.com/tendermint/tendermint/version"
dbm "github.com/tendermint/tm-db"
)


+ 1
- 1
state/helpers_test.go View File

@ -13,13 +13,13 @@ import (
cryptoenc "github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/internal/test/factory"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
tmstate "github.com/tendermint/tendermint/proto/tendermint/state"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/proxy"
sm "github.com/tendermint/tendermint/state"
sf "github.com/tendermint/tendermint/state/test/factory"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
type paramsChangeTestCase struct {


+ 1
- 1
state/state.go View File

@ -9,10 +9,10 @@ import (
"github.com/gogo/protobuf/proto"
tmtime "github.com/tendermint/tendermint/libs/time"
tmstate "github.com/tendermint/tendermint/proto/tendermint/state"
tmversion "github.com/tendermint/tendermint/proto/tendermint/version"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
"github.com/tendermint/tendermint/version"
)


+ 1
- 1
state/validation_test.go View File

@ -15,13 +15,13 @@ import (
memmock "github.com/tendermint/tendermint/internal/mempool/mock"
"github.com/tendermint/tendermint/internal/test/factory"
"github.com/tendermint/tendermint/libs/log"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/state/mocks"
sf "github.com/tendermint/tendermint/state/test/factory"
"github.com/tendermint/tendermint/store"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
dbm "github.com/tendermint/tm-db"
)


+ 1
- 1
store/store_test.go View File

@ -16,10 +16,10 @@ import (
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/libs/log"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/state/test/factory"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
"github.com/tendermint/tendermint/version"
)


+ 1
- 1
types/block_test.go View File

@ -23,9 +23,9 @@ import (
"github.com/tendermint/tendermint/libs/bits"
"github.com/tendermint/tendermint/libs/bytes"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmversion "github.com/tendermint/tendermint/proto/tendermint/version"
tmtime "github.com/tendermint/tendermint/types/time"
"github.com/tendermint/tendermint/version"
)


+ 1
- 1
types/canonical.go View File

@ -3,8 +3,8 @@ package types
import (
"time"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
// Canonical* wraps the structs in types for amino encoding them for use in SignBytes / the Signable interface.


+ 1
- 1
types/genesis.go View File

@ -11,7 +11,7 @@ import (
"github.com/tendermint/tendermint/crypto"
tmbytes "github.com/tendermint/tendermint/libs/bytes"
tmjson "github.com/tendermint/tendermint/libs/json"
tmtime "github.com/tendermint/tendermint/types/time"
tmtime "github.com/tendermint/tendermint/libs/time"
)
const (


+ 1
- 1
types/genesis_test.go View File

@ -10,7 +10,7 @@ import (
"github.com/tendermint/tendermint/crypto/ed25519"
tmjson "github.com/tendermint/tendermint/libs/json"
tmtime "github.com/tendermint/tendermint/types/time"
tmtime "github.com/tendermint/tendermint/libs/time"
)
func TestGenesisBad(t *testing.T) {


+ 1
- 1
types/proposal.go View File

@ -7,8 +7,8 @@ import (
"github.com/tendermint/tendermint/internal/libs/protoio"
tmbytes "github.com/tendermint/tendermint/libs/bytes"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
var (


+ 1
- 1
types/vote_set_test.go View File

@ -11,8 +11,8 @@ import (
"github.com/tendermint/tendermint/crypto"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmtime "github.com/tendermint/tendermint/libs/time"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
func TestVoteSet_AddVote_Good(t *testing.T) {


Loading…
Cancel
Save