foundry
foundry copied to clipboard
The snapshot service must wait to join the child thread on exit
https://github.com/CodeChain-io/codechain/blob/18e1e80af4503cfd4d06e9514e9f88370995abda/sync/src/snapshot/service.rs#L72 Currently, the snapshot service spawns a thread to use the db but doesn't wait for the end of the child thread when it exit. It can corrupt the db.