-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor DeliverTx hook so that panics can be handled (#543)
## Describe your changes and provide context Panics in tx handler is usually handled by a defer statement containing a `recover()` clause. Previously the call stack looks like: ``` func DeliverTx: func runTx: deferred recover (actual processing) DeliverTx hook ``` In the above structure, DeliverTx hooks are run on `DeliverTx` level, so they are outside the deferred recover clause which is within `runTx` level. This PR changes it to be: ``` func DeliverTx: func runTx: deferred recover (actual processing) DeliverTx hook ``` so that the hook can be recovered as well ## Testing performed to validate your change unit test
- Loading branch information
Showing
4 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters