mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2025-01-20 16:51:12 +00:00
79a478bb61
This PR implements resettable freezer by adding a ResettableFreezer wrapper. The resettable freezer wraps the original freezer in a way that makes it possible to ensure atomic resets. Implementation wise, it relies on the os.Rename and os.RemoveAll to atomically delete the original freezer data and re-create a new one from scratch.