Rollback changes on route handler crash
Overview
According invariant no.5 we should revisit the behavoir on handler crash.
Current state
On handler crash we just return the error, but do not rollback/revert any appied changes to database/blockchain.
Improvement
-
SQL-chain: I think we can do it via database features; -
File-chain: we need to add rollback toPheix::Model::Database::Filechainmodule; -
Blockchain: tricky thing, but I think if we can implement it for File-chain, we will be able to apply the same implementation to Blockchain.
Notes:
- consider performance and runtime speed for
Blockchain; - consiter this feature as configurable via the settings.
Edited by Konstantin Narkhov