-
Notifications
You must be signed in to change notification settings - Fork 25
COR-1651: Add touch kernel method
#1441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'm currently trying to test this with a local node and see whether it also resolves COR-1650 (empty deny list blocking transfer). |
|
Tested this locally and this works as expected. |
|
I can also not reproduce COR-1650 with this change anymore. Transfers will work with empty deny lists for when only deny lists are enabled. Transfers will also work if allow and deny lists are enabled and the receiver is on the allow list and it's deny list is empty. |
concordium-consensus/src/Concordium/GlobalState/Persistent/BlockState.hs
Outdated
Show resolved
Hide resolved
Adds definitions and implementation of the `touchTokenAccount` operation in the token kernel and the block state operations. The interface in the kernel is ``` touch :: PLTAccount m -> m Bool ``` The return value indicates whether the account already had a token balance associated (False) or if a zero account balance was newly created (True).
Added a new function `updateTokenAccountState` to Persistent/Account.hs that deals with updating the token account state table. The function is then used in Persistent/BlockState.hs abstractions for the persistent account versions.
concordium-consensus/src/Concordium/GlobalState/Persistent/Account.hs
Outdated
Show resolved
Hide resolved
concordium-consensus/src/Concordium/GlobalState/Persistent/Account.hs
Outdated
Show resolved
Hide resolved
…ount.hs Co-authored-by: Thomas Dinsdale-Young <td202@users.noreply.github.com>
Purpose
Introduce
touchkernel method.Changes
touchkernel methodbsoTouchTokenAccountmethodChecklist
hard-to-understand areas.
CLA acceptance
_Remove if not applicable.
By submitting the contribution I accept the terms and conditions of the
Contributor License Agreement v1.0
link: https://developers.concordium.com/CLAs/Contributor-License-Agreement-v1.0.pdf
I accept the above linked CLA.