rpc: separate out golang API into rpc/core

This commit is contained in:
Ethan Buchman
2015-03-26 21:30:42 -07:00
parent d2724c9731
commit 1fb1163721
8 changed files with 264 additions and 0 deletions

29
rpc/core/pipe.go Normal file
View File

@@ -0,0 +1,29 @@
package core
import (
"github.com/tendermint/tendermint/consensus"
mempl "github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/p2p"
"github.com/tendermint/tendermint/types"
)
var blockStore *types.BlockStore
var consensusState *consensus.ConsensusState
var mempoolReactor *mempl.MempoolReactor
var p2pSwitch *p2p.Switch
func SetPipeBlockStore(bs *types.BlockStore) {
blockStore = bs
}
func SetPipeConsensusState(cs *consensus.ConsensusState) {
consensusState = cs
}
func SetPipeMempoolReactor(mr *mempl.MempoolReactor) {
mempoolReactor = mr
}
func SetPipeSwitch(sw *p2p.Switch) {
p2pSwitch = sw
}