Remove BeginBlock

This commit is contained in:
Jae Kwon
2016-03-06 18:02:29 -08:00
parent 3adb579cf1
commit 18d0da4ea3
3 changed files with 4 additions and 21 deletions
+1 -2
View File
@@ -20,6 +20,5 @@ type AppConn interface {
FlushSync() error
CommitSync() (hash []byte, log string, err error)
InitChainSync(validators []*tmsp.Validator) (err error)
BeginBlockSync(height uint64) (err error)
EndBlockSync() (changedValidators []*tmsp.Validator, err error)
EndBlockSync(height uint64) (changedValidators []*tmsp.Validator, err error)
}
+2 -11
View File
@@ -109,19 +109,10 @@ func (app *localAppConn) InitChainSync(validators []*tmsp.Validator) (err error)
return nil
}
func (app *localAppConn) BeginBlockSync(height uint64) (err error) {
func (app *localAppConn) EndBlockSync(height uint64) (changedValidators []*tmsp.Validator, err error) {
app.mtx.Lock()
if bcApp, ok := app.Application.(tmsp.BlockchainAware); ok {
bcApp.BeginBlock(height)
}
app.mtx.Unlock()
return nil
}
func (app *localAppConn) EndBlockSync() (changedValidators []*tmsp.Validator, err error) {
app.mtx.Lock()
if bcApp, ok := app.Application.(tmsp.BlockchainAware); ok {
changedValidators = bcApp.EndBlock()
changedValidators = bcApp.EndBlock(height)
}
app.mtx.Unlock()
return changedValidators, nil