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
907 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. var privValidator *state.PrivValidator
  15. func SetBlockStore(bs *bc.BlockStore) {
  16. blockStore = bs
  17. }
  18. func SetConsensusState(cs *consensus.ConsensusState) {
  19. consensusState = cs
  20. }
  21. func SetConsensusReactor(cr *consensus.ConsensusReactor) {
  22. consensusReactor = cr
  23. }
  24. func SetMempoolReactor(mr *mempl.MempoolReactor) {
  25. mempoolReactor = mr
  26. }
  27. func SetSwitch(sw *p2p.Switch) {
  28. p2pSwitch = sw
  29. }
  30. func SetPrivValidator(pv *state.PrivValidator) {
  31. privValidator = pv
  32. }