mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-02 22:27:19 +00:00
Remove BeginBlock
This commit is contained in:
+1
-2
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user