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.

34 lines
755 B

  1. package core
  2. import (
  3. bc "github.com/tendermint/tendermint/blockchain"
  4. "github.com/tendermint/tendermint/consensus"
  5. mempl "github.com/tendermint/tendermint/mempool"
  6. "github.com/tendermint/tendermint/p2p"
  7. "github.com/tendermint/tendermint/state"
  8. )
  9. var blockStore *bc.BlockStore
  10. var consensusState *consensus.ConsensusState
  11. var mempoolReactor *mempl.MempoolReactor
  12. var p2pSwitch *p2p.Switch
  13. func SetBlockStore(bs *bc.BlockStore) {
  14. blockStore = bs
  15. }
  16. func SetConsensusState(cs *consensus.ConsensusState) {
  17. consensusState = cs
  18. }
  19. func SetMempoolReactor(mr *mempl.MempoolReactor) {
  20. mempoolReactor = mr
  21. }
  22. func SetSwitch(sw *p2p.Switch) {
  23. p2pSwitch = sw
  24. }
  25. func SetPrivValidator(priv *state.PrivValidator) {
  26. consensusState.SetPrivValidator(priv)
  27. }