mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
Make sure the entire buffer was written (#1842)
We may write just a part of the buffer and we don't check the result, so write_all is probably what we need here
This commit is contained in:
parent
58e68a867e
commit
b889069722
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ impl AppendOnlyFile {
|
|||
}
|
||||
|
||||
self.buffer_start += self.buffer.len();
|
||||
self.file.write(&self.buffer[..])?;
|
||||
self.file.write_all(&self.buffer[..])?;
|
||||
self.file.sync_all()?;
|
||||
|
||||
self.buffer = vec![];
|
||||
|
|
Loading…
Reference in a new issue