I have a solidity function:
function something(bytes32 hash) public returns (bool) {
bool success;
success = check(hash);
emit LogSomething(msg.sender, hash, success);
return success;
}
and I try to show its result on Web3:
contractInstance.something(hash, params, function(error, result){
if (error) {
alert("Error!");
} else {
$("span#result").text(result);
}
})
However, in my result span, I get the transaction hash:
0xd0039716e5834ac880f3b66e024c29e4b25cdf69e26b4f19e278f116d6a2fec2
instead of a True or False as expected from a boolean output. Why is this so? There are no error messages whatsoever and I'm confident in the code logic.