Browse Source

consensus: sync wal.writeHeight

pull/343/head
Ethan Buchman 8 years ago
parent
commit
f4e6cf4439
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      consensus/wal.go

+ 5
- 0
consensus/wal.go View File

@ -104,4 +104,9 @@ func (wal *WAL) Save(wmsg WALMessage) {
func (wal *WAL) writeHeight(height int) {
wal.group.WriteLine(Fmt("#HEIGHT: %v", height))
// TODO: only flush when necessary
if err := wal.group.Flush(); err != nil {
PanicQ(Fmt("Error flushing consensus wal buf to file. Error: %v \n", err))
}
}

Loading…
Cancel
Save