proxy: typed app conns

This commit is contained in:
Ethan Buchman
2016-08-17 22:28:08 -04:00
parent 4802145e8f
commit 3a7ee13ece
12 changed files with 319 additions and 100 deletions

View File

@ -215,7 +215,7 @@ type ConsensusState struct {
QuitService
config cfg.Config
proxyAppConn proxy.AppConn
proxyAppConn proxy.AppConnConsensus
blockStore *bc.BlockStore
mempool *mempl.Mempool
privValidator *types.PrivValidator
@ -238,7 +238,7 @@ type ConsensusState struct {
nSteps int // used for testing to limit the number of transitions the state makes
}
func NewConsensusState(config cfg.Config, state *sm.State, proxyAppConn proxy.AppConn, blockStore *bc.BlockStore, mempool *mempl.Mempool) *ConsensusState {
func NewConsensusState(config cfg.Config, state *sm.State, proxyAppConn proxy.AppConnConsensus, blockStore *bc.BlockStore, mempool *mempl.Mempool) *ConsensusState {
cs := &ConsensusState{
config: config,
proxyAppConn: proxyAppConn,
@ -1283,7 +1283,7 @@ func (cs *ConsensusState) commitStateUpdateMempool(s *sm.State, block *types.Blo
defer cs.mempool.Unlock()
// flush out any CheckTx that have already started
cs.proxyAppConn.FlushSync()
// cs.proxyAppConn.FlushSync() // ?! XXX
// Commit block, get hash back
res := cs.proxyAppConn.CommitSync()