Add checkpoint seq no verification.

This commit is contained in:
Ben Johnson
2020-12-23 11:15:10 -07:00
parent 311f47fe98
commit 5218a1f2c2
2 changed files with 26 additions and 7 deletions

View File

@@ -68,6 +68,10 @@ func readWALHeader(filename string) ([]byte, error) {
return buf[:n], err
}
func readCheckpointSeqNo(hdr []byte) uint32 {
return binary.BigEndian.Uint32(hdr[12:])
}
// readFileAt reads a slice from a file.
func readFileAt(filename string, offset, n int64) ([]byte, error) {
f, err := os.Open(filename)