Unlocked Account can obtain return values from a call function. Basically I assign eth.defaultAccount
with some valid address, which only have access to the some state variables as you can see under getIndexReadFrom()
as clusterContract[msg.sender].getIndexReadFrom()
.
[Q] Is it normal that even I didn't unlocked the account, I can use that account as msg.sender
when I call a contract's function and reach that account's mapped information? Is there any lock mechanism that can I prevent this from happening, where only who can unlocks the account could reach the mapped information?
> eth.defaultAccount = "0x6af0204187a93710317542d383a1b547fa42e706"
> eth.defaultAccount
"0x6af0204187a93710317542d383a1b547fa42e706"
> myContract.getIndexReadFrom()
10 //Returns a valid information.
Example function:
function getIndexReadFrom() constant returns ( uint ) {
return clusterContract[msg.sender].getIndexReadFrom();
}