Implement Init/Sync Validators

This commit is contained in:
Jae Kwon
2016-02-28 19:19:29 -08:00
parent 1ffe780976
commit dcabdad9b9
6 changed files with 100 additions and 23 deletions

View File

@ -1,5 +1,6 @@
package types
// Applications
type Application interface {
// Return application info
@ -20,3 +21,13 @@ type Application interface {
// Query for state
Query(query []byte) (code CodeType, result []byte, log string)
}
// Some applications can choose to implement ValidatorAware
type ValidatorAware interface {
// Give app initial list of validators upon genesis
InitValidators([]*Validator)
// Receive updates to validators from app, prior to commit
SyncValidators() []*Validator
}