consensus: sync wal.writeHeight

This commit is contained in:
Ethan Buchman 2016-12-22 15:01:02 -05:00
parent e4921733df
commit f4e6cf4439

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))
}
}