-
Notifications
You must be signed in to change notification settings - Fork 46
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
存储区变量赋值操作生效时机及是否是原子操作的问题? #49
Comments
This comment has been minimized.
This comment has been minimized.
召唤大神 |
问题用一句话描述就是 如何在合约里保证某一方法只能被执行一次😂,求大神帮忙~ |
合约的链上数据的更改是在交易执行成功之后才会生效的,不过对同一合约的调用不会并发执行的,所以不用担心数据的同步问题。 |
好的,感谢~~ |
我们对事务的控制是Serializable级别的吗? |
@hiliushuo 是的,可以理解为是Serializable级别 |
好的,感谢 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
现在有个需求是想【满足某个条件的时候触发一方法执行,且该方法只允许执行一次】
目前实现思路是在中心化 server 判断当区块高度变化时轮询合约runGame方法,runGame方法中通过修改gameStatus的值
问题 this.gameStatus = 3; 这个操作的生效是需要整个 tx success 之后呢 还是说方法体中执行过这个语句之后立即生效呢?
这个赋值操作是原子操作吗?(会立即反应到存储区吗?)
感谢!~
The text was updated successfully, but these errors were encountered: