fix DataCache functions have inconsistent behaviour#1193
fix DataCache functions have inconsistent behaviour#1193ixje wants to merge 4 commits intoneo-project:masterfrom ixje:fix-1186
Conversation
|
I don't think these changes are correct... |
|
@erikzhang can you be more explicit what part you think is incorrect about it?
|
|
Let's say we have a contract doing the following steps: It reads 100 entries, and update 1 entry. If we allow both |
|
I agree it will attempt to modify 101 entries (assuming LevelDB doesn't do anything smart if it sees no changes). However, we need to keep in mind that everything is put into a neo/neo/Persistence/LevelDB/DbCache.cs Lines 51 to 54 in cd85039 My fear is that there is a security issue lurking around the corner because some people believe
and this is not true as shown in this table (case 1 + 6) |
|
What about if we use a different dictionaries for caching Option B, if it's already in the cache, return a copy when use |
|
Option B, a copy would streamline the behaviour in all situations. Alternatively, an optional |

fix #1186