Closed chalith closed 2 years ago
Please submit fully reproducible code from a genesis ledger including any setup that needs to happen on ledger. Your code assumes a pre-existing "old state" and does nothing on a genesis ledger. Re-open issue with complete code.
Hint: your array existing_data
should be type uint8_t
Issue Description
When state_set(0, 0, SBUF(key)) is used to delete an older state object, It looks deleted when the we check for the existence of that state object withing the same hook execution after the deletion. But if we check for that deleted state object in an another hook execution, it's still there. And the state value is also consistent with the original value (As it was not deleted at all).
Checked the same steps for a newly created hook state. But it's getting deleted without an issue and stays deleted for next executions as well.
Steps to Reproduce
This is my hook contract:
Expected Result
For older state object, trace prefix: OLDER STATE:
For new state object, trace prefix: NEW STATE:
Actual Result
For older state object, trace prefix: OLDER STATE:
For new state object, trace prefix: NEW STATE:
Conclusion
Environment
testnet hooks-chaining branch