I have a contract with a function that increments a value, but contains a check in a require statement to verify that the incremented value is not over a specified threshold... here's some pseudo-code of what I am referring to:
contract mycontract{
uint threshold = 5;
uint value;
function myFunction(){
value = value + 1
require(value <= threshold)
//do something
}
}
What Im wondering is if there are multiple calls to myFunction() within the same block, how will this act? Im not sure how to create a bundle of transactions all within the same block to test it. If value is equal to 4 in the above example, and there are 3 calls to myFunction() in the same block, will all 3 function calls have reference to the same Value=4 or will the first call execute, increment value to 5, finish the function execution and then the second call will have Value=5 and fail the require check and third call Value=5 and fail as well?