tendermint/rpc/rpc.go

30 lines
626 B
Go
Raw Normal View History

2014-12-31 22:42:37 -08:00
package rpc
import (
2015-01-15 22:43:15 -08:00
blk "github.com/tendermint/tendermint/block"
2015-01-11 14:27:46 -08:00
"github.com/tendermint/tendermint/consensus"
mempl "github.com/tendermint/tendermint/mempool"
2015-03-16 22:30:32 -07:00
"github.com/tendermint/tendermint/p2p"
2014-12-31 22:42:37 -08:00
)
2015-01-15 22:43:15 -08:00
var blockStore *blk.BlockStore
2015-01-11 14:27:46 -08:00
var consensusState *consensus.ConsensusState
var mempoolReactor *mempl.MempoolReactor
2015-03-16 22:30:32 -07:00
var p2pSwitch *p2p.Switch
2014-12-31 22:42:37 -08:00
2015-01-15 22:43:15 -08:00
func SetRPCBlockStore(bs *blk.BlockStore) {
2015-01-06 15:51:41 -08:00
blockStore = bs
2014-12-31 22:42:37 -08:00
}
2015-01-11 14:27:46 -08:00
func SetRPCConsensusState(cs *consensus.ConsensusState) {
consensusState = cs
2015-01-06 15:51:41 -08:00
}
func SetRPCMempoolReactor(mr *mempl.MempoolReactor) {
2015-01-06 15:51:41 -08:00
mempoolReactor = mr
2014-12-31 22:42:37 -08:00
}
2015-03-16 22:30:32 -07:00
func SetSwitch(sw *p2p.Switch) {
p2pSwitch = sw
}