s/InitValidators/InitChain/g, s/SyncValidators/EndBlock/g, added BeginBlock

This commit is contained in:
Jae Kwon
2016-03-05 19:18:34 -08:00
parent 72540f9cac
commit 36c25f242f
7 changed files with 252 additions and 134 deletions

View File

@ -22,12 +22,17 @@ type Application interface {
Query(query []byte) (code CodeType, result []byte, log string)
}
// Some applications can choose to implement ValidatorAware
type ValidatorAware interface {
// Some applications can choose to implement BlockchainAware
type BlockchainAware interface {
// Give app initial list of validators upon genesis
InitValidators([]*Validator)
// Initialize blockchain
// validators: genesis validators from TendermintCore
InitChain(validators []*Validator)
// Receive updates to validators from app, prior to commit
SyncValidators() []*Validator
// Signals the beginning of a block
BeginBlock(height uint64)
// Signals the end of a block
// validators: changed validators from app to TendermintCore
EndBlock() (validators []*Validator)
}