I have one question that relates to a smart contract, EVM, and mining.
contract Test {
event Transfer(
address indexed _from,
address indexed _to,
uint256 _amount,
uint256 _seq
);
uint256 public _seq;
function transfer(address _to, uint256 _amount) external {
_seq++;
emit Transfer(msg.sender, _to, _amount, _seq);
}
}
Given:
- At time t = 10: the state variable '_seq = 10'
- There are 3 nodes calling transfer(), then generating transactions at the same time (t = 10)
- Tx 1: _seq++ = 11 ==> Transfer(Node1.address, _to1, _amount1, 11)
- Tx2: _seq++ = 11 ==> Transfer(Node2.address, _to2, _amount2, 11)
- Tx3: _seq++ = 11 ==> Transfer(Node3.address, _to3, _amount3, 11)
My question is:
- Will the state variable '_seq' be updated to 11 or 13 after these transactions are mined and added into a block?