]> Untitled Git - bdk/commit
test(file_store): `last_write_is_short`
author志宇 <hello@evanlinjin.me>
Sat, 13 Jan 2024 09:47:13 +0000 (17:47 +0800)
committer志宇 <hello@evanlinjin.me>
Sat, 13 Jan 2024 09:51:41 +0000 (17:51 +0800)
commitc8717646700bdac0f1e13ec499481bd1fee30ffd
tree40ee7a2bd08eb2b37e96ae20766121fca77486e2
parenta3aa8b6682a3a13958fd5fbadc4074a1907a78db
test(file_store): `last_write_is_short`

This test simulates a situation where the last write to the db is short.

Aggregating the changeset after reopening the file should return an
error (which includes a partially-aggregated changeset) containing an
aggregation of changesets that were fully written.

At this point, the test re-writes the final changeset (and this time it
successfully writes in full).

The file should be recoverable with all changesets, including the last
one.
crates/file_store/src/store.rs