In my contract iI have a view public function that returns an array of bytes32 elements. In remix it produces a warning saying it might run out of block gas limit if iI use this function.
As iI had read when a function doesn't make state changes you define it as view public. So when you call it you don't have to pay ether because your local node calls the variables from the contract and runs it localy. Is this right? Then why iI have to worry about gas limit?
Re-edit after Lauri's Peltonen comment. The code iI used is:
pragma solidity ^0.4.18;
contract Project{
bytes32[] array; function addValue(bytes32 element)public{ //only the administrator can add new values array.push(element); } function getAll()view public returns(bytes32[]){ return array; } }pragma solidity ^0.4.18;
contract Project{
bytes32[] array;
function addValue(bytes32 element)public{
//only the administrator can add new values
array.push(element);
}
function getAll()view public returns(bytes32[]){
return array;
}
}