pragma solidity ^0.4.0;
contract test {
bool test_bool1 = false;
bool test_bool2 = true;
modifier test_modifier(bool _test_bool){
if (_test_bool == false) throw;
_;
}
function test1(uint input1) test_modifier(test_bool1) returns (uint){
return input1;
}
function test2(uint input2) test_modifier(test_bool2) returns (uint){
return input2;
}
}
Here is my simple modifier test code.
If I deploy that contract and call test.test1(5)
, I expect shoud not return anything because test_bool1
is false
. The result of eth.getTransaction()
of this function call transactionHash
will be:
>console.log((eth.getTransaction("0x9da931ab4a750423bd780a3b76b70d32ab14f7af0bb967f765c72f9e84674e48").input))
0x19ae89940000000000000000000000000000000000000000000000000000000000000005
5
And if I do it again with test.test2(5)
(which passed modifier test) I get:
> console.log((eth.getTransaction("0xdf2d0d0ff2a7aed5bf53ca23ccbcb05c76f350255120a098829c839965c4439d").input))
0xcaf446830000000000000000000000000000000000000000000000000000000000000005
5
Why did that happend?
Is there anything about first 8 digits of transaction input? caf44683
, 19ae8994