CrowdSale out of gaz ?

eburgeleburgel Member Posts: 3
edited April 2016 in Solidity
In the CrowdSale contract exemple the "checkGoalReached" function is coded like this

/* checks if the goal or time limit has been reached and ends the campaign */
function checkGoalReached() afterDeadline {
if (amountRaised >= fundingGoal){
FundTransfer(beneficiary, amountRaised, false);
} else {
for (uint i = 0; i < funders.length; ++i) {
FundTransfer(funders[i].addr, funders[i].amount, false);
In case of refunding, according to Mix the two line in the refund loop cost 35000 units of gaz.
Given that the gaz limit in Homestead is 4712388,
the code can loop for a maximum of 134 times.
Does it mean that if there are more than 134 backers, nobody will never be refund and the Ethers are lost, as they are stuck in the contract and the transaction would go out of gaz ?
Post edited by eburgel on


Sign In or Register to comment.