Fireable -> EventSwitch; rs in EventDataRoundState; fixes from review

This commit is contained in:
Ethan Buchman
2015-12-14 00:38:19 -05:00
parent 261647a012
commit b9e143d956
10 changed files with 127 additions and 166 deletions

View File

@ -33,7 +33,7 @@ type State struct {
LastValidators *types.ValidatorSet
LastAppHash []byte
evc events.Fireable // typically an events.EventCache
evc *events.EventCache
}
func LoadState(db dbm.DB) *State {
@ -81,8 +81,7 @@ func (s *State) Save() {
s.db.Set(stateKey, buf.Bytes())
}
// Implements events.Eventable. Typically uses events.EventCache
func (s *State) SetFireable(evc events.Fireable) {
func (s *State) SetEventCache(evc *events.EventCache) {
s.mtx.Lock()
defer s.mtx.Unlock()