mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
RPCResponse.Result && EventData are registered interfaces; -skip_upnp option
This commit is contained in:
@ -1,15 +1,14 @@
|
||||
package consensus
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
bc "github.com/tendermint/tendermint/blockchain"
|
||||
dbm "github.com/tendermint/tendermint/db"
|
||||
mempl "github.com/tendermint/tendermint/mempool"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
func randConsensusState() (*ConsensusState, []*sm.PrivValidator) {
|
||||
func randConsensusState() (*ConsensusState, []*types.PrivValidator) {
|
||||
state, _, privValidators := sm.RandGenesisState(20, false, 1000, 10, false, 1000)
|
||||
blockStore := bc.NewBlockStore(dbm.NewMemDB())
|
||||
mempool := mempl.NewMempool(state)
|
||||
@ -17,16 +16,3 @@ func randConsensusState() (*ConsensusState, []*sm.PrivValidator) {
|
||||
cs := NewConsensusState(state, blockStore, mempoolReactor)
|
||||
return cs, privValidators
|
||||
}
|
||||
|
||||
func randVoteSet(height int, round int, type_ byte, numValidators int, votingPower int64) (*VoteSet, *sm.ValidatorSet, []*sm.PrivValidator) {
|
||||
vals := make([]*sm.Validator, numValidators)
|
||||
privValidators := make([]*sm.PrivValidator, numValidators)
|
||||
for i := 0; i < numValidators; i++ {
|
||||
_, val, privValidator := sm.RandValidator(false, votingPower)
|
||||
vals[i] = val
|
||||
privValidators[i] = privValidator
|
||||
}
|
||||
valSet := sm.NewValidatorSet(vals)
|
||||
sort.Sort(sm.PrivValidatorsByAddress(privValidators))
|
||||
return NewVoteSet(height, round, type_, valSet), valSet, privValidators
|
||||
}
|
||||
|
Reference in New Issue
Block a user