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.

40 lines
916 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 consensusReactor *consensus.ConsensusReactor
  12. var mempoolReactor *mempl.MempoolReactor
  13. var p2pSwitch *p2p.Switch
  14. func SetBlockStore(bs *bc.BlockStore) {
  15. blockStore = bs
  16. }
  17. func SetConsensusState(cs *consensus.ConsensusState) {
  18. consensusState = cs
  19. }
  20. func SetConsensusReactor(cr *consensus.ConsensusReactor) {
  21. consensusReactor = cr
  22. }
  23. func SetMempoolReactor(mr *mempl.MempoolReactor) {
  24. mempoolReactor = mr
  25. }
  26. func SetSwitch(sw *p2p.Switch) {
  27. p2pSwitch = sw
  28. }
  29. // JAE Why is this here?
  30. func SetPrivValidator(priv *state.PrivValidator) {
  31. consensusReactor.SetPrivValidator(priv)
  32. }