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.

29 lines
629 B

10 years ago
  1. package rpc
  2. import (
  3. blk "github.com/tendermint/tendermint/block"
  4. "github.com/tendermint/tendermint/consensus"
  5. mempl "github.com/tendermint/tendermint/mempool"
  6. "github.com/tendermint/tendermint/p2p"
  7. )
  8. var blockStore *blk.BlockStore
  9. var consensusState *consensus.ConsensusState
  10. var mempoolReactor *mempl.MempoolReactor
  11. var p2pSwitch *p2p.Switch
  12. func SetRPCBlockStore(bs *blk.BlockStore) {
  13. blockStore = bs
  14. }
  15. func SetRPCConsensusState(cs *consensus.ConsensusState) {
  16. consensusState = cs
  17. }
  18. func SetRPCMempoolReactor(mr *mempl.MempoolReactor) {
  19. mempoolReactor = mr
  20. }
  21. func SetRPCSwitch(sw *p2p.Switch) {
  22. p2pSwitch = sw
  23. }