mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 22:44:24 +00:00
make the rest of the code compile
This commit is contained in:
@@ -10,8 +10,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/tendermint/tendermint/pkg/mempool"
|
||||
e2e "github.com/tendermint/tendermint/test/e2e/pkg"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
// Tests that any initial state given in genesis has made it into the app.
|
||||
@@ -80,7 +80,7 @@ func TestApp_Tx(t *testing.T) {
|
||||
|
||||
key := fmt.Sprintf("testapp-tx-%v", node.Name)
|
||||
value := fmt.Sprintf("%x", bz)
|
||||
tx := types.Tx(fmt.Sprintf("%v=%v", key, value))
|
||||
tx := mempool.Tx(fmt.Sprintf("%v=%v", key, value))
|
||||
|
||||
_, err = client.BroadcastTxSync(ctx, tx)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/tendermint/tendermint/pkg/block"
|
||||
rpchttp "github.com/tendermint/tendermint/rpc/client/http"
|
||||
rpctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
e2e "github.com/tendermint/tendermint/test/e2e/pkg"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -26,7 +26,7 @@ var (
|
||||
ctx = context.Background()
|
||||
testnetCache = map[string]e2e.Testnet{}
|
||||
testnetCacheMtx = sync.Mutex{}
|
||||
blocksCache = map[string][]*types.Block{}
|
||||
blocksCache = map[string][]*block.Block{}
|
||||
blocksCacheMtx = sync.Mutex{}
|
||||
)
|
||||
|
||||
@@ -84,7 +84,7 @@ func loadTestnet(t *testing.T) e2e.Testnet {
|
||||
|
||||
// fetchBlockChain fetches a complete, up-to-date block history from
|
||||
// the freshest testnet archive node.
|
||||
func fetchBlockChain(t *testing.T) []*types.Block {
|
||||
func fetchBlockChain(t *testing.T) []*block.Block {
|
||||
t.Helper()
|
||||
|
||||
testnet := loadTestnet(t)
|
||||
@@ -115,7 +115,7 @@ func fetchBlockChain(t *testing.T) []*types.Block {
|
||||
to := status.SyncInfo.LatestBlockHeight
|
||||
blocks, ok := blocksCache[testnet.Name]
|
||||
if !ok {
|
||||
blocks = make([]*types.Block, 0, to-from+1)
|
||||
blocks = make([]*block.Block, 0, to-from+1)
|
||||
}
|
||||
if len(blocks) > 0 {
|
||||
from = blocks[len(blocks)-1].Height + 1
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/tendermint/tendermint/pkg/consensus"
|
||||
e2e "github.com/tendermint/tendermint/test/e2e/pkg"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
// Tests that validator sets are available and correct according to
|
||||
@@ -35,7 +35,7 @@ func TestValidator_Sets(t *testing.T) {
|
||||
valSchedule.Increment(first - node.Testnet.InitialHeight)
|
||||
|
||||
for h := first; h <= last; h++ {
|
||||
validators := []*types.Validator{}
|
||||
validators := []*consensus.Validator{}
|
||||
perPage := 100
|
||||
for page := 1; ; page++ {
|
||||
resp, err := client.Validators(ctx, &(h), &(page), &perPage)
|
||||
@@ -126,7 +126,7 @@ func TestValidator_Sign(t *testing.T) {
|
||||
// validatorSchedule is a validator set iterator, which takes into account
|
||||
// validator set updates.
|
||||
type validatorSchedule struct {
|
||||
Set *types.ValidatorSet
|
||||
Set *consensus.ValidatorSet
|
||||
height int64
|
||||
updates map[int64]map[*e2e.Node]int64
|
||||
}
|
||||
@@ -138,7 +138,7 @@ func newValidatorSchedule(testnet e2e.Testnet) *validatorSchedule {
|
||||
}
|
||||
return &validatorSchedule{
|
||||
height: testnet.InitialHeight,
|
||||
Set: types.NewValidatorSet(makeVals(valMap)),
|
||||
Set: consensus.NewValidatorSet(makeVals(valMap)),
|
||||
updates: testnet.ValidatorUpdates,
|
||||
}
|
||||
}
|
||||
@@ -159,10 +159,10 @@ func (s *validatorSchedule) Increment(heights int64) {
|
||||
}
|
||||
}
|
||||
|
||||
func makeVals(valMap map[*e2e.Node]int64) []*types.Validator {
|
||||
vals := make([]*types.Validator, 0, len(valMap))
|
||||
func makeVals(valMap map[*e2e.Node]int64) []*consensus.Validator {
|
||||
vals := make([]*consensus.Validator, 0, len(valMap))
|
||||
for node, power := range valMap {
|
||||
vals = append(vals, types.NewValidator(node.PrivvalKey.PubKey(), power))
|
||||
vals = append(vals, consensus.NewValidator(node.PrivvalKey.PubKey(), power))
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user