Browse Source

Use new Group semantics

pull/326/head
Jae Kwon 8 years ago
parent
commit
e09950d3fb
2 changed files with 5 additions and 9 deletions
  1. +4
    -8
      consensus/wal.go
  2. +1
    -1
      glide.lock

+ 4
- 8
consensus/wal.go View File

@ -41,11 +41,7 @@ type WAL struct {
}
func NewWAL(walDir string, light bool) (*WAL, error) {
head, err := auto.OpenAutoFile(walDir + "/wal")
if err != nil {
return nil, err
}
group, err := auto.OpenGroup(head)
group, err := auto.OpenGroup(walDir + "/wal")
if err != nil {
return nil, err
}
@ -66,13 +62,13 @@ func (wal *WAL) OnStart() error {
} else if size == 0 {
wal.writeHeight(1)
}
return nil
_, err = wal.group.Start()
return err
}
func (wal *WAL) OnStop() {
wal.BaseService.OnStop()
wal.group.Head.Close()
wal.group.Close()
wal.group.Stop()
}
// called in newStep and for each pass in receiveRoutine


+ 1
- 1
glide.lock View File

@ -54,7 +54,7 @@ imports:
- name: github.com/tendermint/flowcontrol
version: 925bee8f392c28190889746f3943fe3793fb4256
- name: github.com/tendermint/go-autofile
version: dc8fa06e642c53339987acfd90154c81c1ab4c6d
version: a528af55d3c8354f676b4a5f718ab51d9b9fbb9f
- name: github.com/tendermint/go-clist
version: 3baa390bbaf7634251c42ad69a8682e7e3990552
- name: github.com/tendermint/go-common


Loading…
Cancel
Save