Skip to content

Commit 18e1e80

Browse files
author
Seulgi Kim
committed
Leave the FIXME comment on the Snapshot service
Current implementation has a potential bug that corrupts the db. But I'll not fix it now because the service is not used yet.
1 parent ea5d2d5 commit 18e1e80

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sync/src/snapshot/service.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ impl ChainNotify for Service {
6868
let db = self.client.database();
6969
let path: PathBuf = [self.root_dir.clone(), format!("{:x}", header.hash())].iter().collect();
7070
let root = header.state_root();
71+
// FIXME: The db can be corrupted because the CodeChain doesn't wait child threads end on exit.
7172
spawn(move || match Snapshot::try_new(path).map(|s| s.write_snapshot(db.as_ref(), &root)) {
7273
Ok(_) => {}
7374
Err(Error::FileError(ErrorKind::AlreadyExists)) => {}

0 commit comments

Comments
 (0)