xian-network / xian-contracting

A subset of Python for developing smart contracts on the Xian Network
https://linktr.ee/xiannetwork
GNU General Public License v3.0
16 stars 1 forks source link

Update executor.py #51

Closed crosschainer closed 5 months ago

crosschainer commented 5 months ago

Transactions that fail on an exception seem to be saving everything until the exception happened.

crosschainer commented 5 months ago

This will fix it but cause even more issues. If a tx changes a value and then another tx does something to the same value but the cache is flushed after because of exception no changes will ever be applied from the successful tx because we only really apply changes on the end of the block. We need to only remove the changes from this one transaction from the cache. So a method that removes specific writes and reads from the caches