You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
639 B

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. package consensus
  2. import (
  3. bc "github.com/tendermint/tendermint/blockchain"
  4. dbm "github.com/tendermint/tendermint/db"
  5. mempl "github.com/tendermint/tendermint/mempool"
  6. sm "github.com/tendermint/tendermint/state"
  7. "github.com/tendermint/tendermint/types"
  8. )
  9. func randConsensusState() (*ConsensusState, []*types.PrivValidator) {
  10. state, _, privValidators := sm.RandGenesisState(20, false, 1000, 10, false, 1000)
  11. blockStore := bc.NewBlockStore(dbm.NewMemDB())
  12. mempool := mempl.NewMempool(state)
  13. mempoolReactor := mempl.NewMempoolReactor(mempool)
  14. cs := NewConsensusState(state, blockStore, mempoolReactor)
  15. return cs, privValidators
  16. }