aergoio / aergo

aergo blockchain kernel
http://docs.aergo.io
MIT License
214 stars 44 forks source link

rollback contract state on failed pcall #313

Closed kroggen closed 10 months ago

kroggen commented 10 months ago

This makes the pcall and xpcall rollback the contract state (state variables, nonce, balance, sql db) when the called function fails

The PR is built on top of #199 and it is made to be merged into it first, if approved

It is made into a separate PR in order to discuss if this is a bug-fix, what is the expected behavior of these functions, and if backwards compatibility is required