You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// calculate total for only the first 12 values, in case more than 12 are entered
for (uint i =0; i <12; i++)
{
Total += DefectiveComponentsCount[i];
}
State = StateType.ComputeTotal;
}
As documented by its following specification, computeTotal funtion can only be called once. However, in the contract implementation, there is no such restriction.
blockchain/blockchain-workbench/application-and-smart-contract-samples/defective-component-counter/ethereum/DefectiveComponentCounter.sol
Lines 24 to 39 in 1b712d6
As documented by its following specification, computeTotal funtion can only be called once. However, in the contract implementation, there is no such restriction.
blockchain/blockchain-workbench/application-and-smart-contract-samples/defective-component-counter/ethereum/DefectiveComponentCounter.json
Lines 73 to 99 in 1b712d6
We can fix such bug using the following statement.
The text was updated successfully, but these errors were encountered: