Updated a few comments

Made one owner to controller change and got everything i could to conform to the 80 char
This commit is contained in:
Griff Green 2016-11-11 15:33:29 +01:00 committed by GitHub
parent 3471fed908
commit 72845f9509
1 changed files with 14 additions and 13 deletions

View File

@ -25,8 +25,8 @@ pragma solidity ^0.4.4;
contract Controlled { contract Controlled {
/// @notice The address of the controller is the only address that can call a /// @notice The address of the controller is the only address that can call
/// function with this modifier /// a function with this modifier
modifier onlyController { if (msg.sender != controller) throw; _; } modifier onlyController { if (msg.sender != controller) throw; _; }
address public controller; address public controller;
@ -146,10 +146,10 @@ contract MiniMeToken is Controlled {
function transferFrom(address _from, address _to, uint256 _amount function transferFrom(address _from, address _to, uint256 _amount
) returns (bool success) { ) returns (bool success) {
// The controller of this contract can move tokens around at will, this is // The controller of this contract can move tokens around at will, this
// important to recognize! Confirm that you trust the controller of this // is important to recognize! Confirm that you trust the controller of
// contract, which in most situations should be another open source // this contract, which in most situations should be another open
// smart contract or 0x0 // source smart contract or 0x0
if (msg.sender != controller) { if (msg.sender != controller) {
if (isConstant) throw; if (isConstant) throw;
@ -272,8 +272,9 @@ contract MiniMeToken is Controlled {
// These next few lines are used when the balance of the token is // These next few lines are used when the balance of the token is
// requested before a check point was ever created for this token, it // requested before a check point was ever created for this token, it
// requires that the `parentToken.balanceOfAt` be queried at the genesis // requires that the `parentToken.balanceOfAt` be queried at the
// block for that token as this contains initial balance of this token. // genesis block for that token as this contains initial balance of
// this token
} else if ((balances[_owner].length == 0) } else if ((balances[_owner].length == 0)
|| (balances[_owner][0].fromBlock > _blockNumber)) { || (balances[_owner][0].fromBlock > _blockNumber)) {
if (address(parentToken) != 0) { if (address(parentToken) != 0) {
@ -409,12 +410,12 @@ contract MiniMeToken is Controlled {
function getValueAt(Checkpoint[] storage checkpoints, uint _block function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) { ) constant internal returns (uint) {
if (checkpoints.length == 0) return 0; if (checkpoints.length == 0) return 0;
// Shorcut for the actual value // Shortcut for the actual value
if (_block >= checkpoints[checkpoints.length-1].fromBlock) if (_block >= checkpoints[checkpoints.length-1].fromBlock)
return checkpoints[checkpoints.length-1].value; return checkpoints[checkpoints.length-1].value;
if (_block < checkpoints[0].fromBlock) return 0; if (_block < checkpoints[0].fromBlock) return 0;
// Binary search of the value in the array. // Binary search of the value in the array
uint min = 0; uint min = 0;
uint max = checkpoints.length-1; uint max = checkpoints.length-1;
while (max > min) { while (max > min) {
@ -441,9 +442,9 @@ contract MiniMeToken is Controlled {
} }
} }
/// @notice The fallback function: If the contract's owner has not been set /// @notice The fallback function: If the contract's controller has not been
/// to 0, the ether is sent to the owner (normally the token creation /// set to 0, the ether is sent to the controller (normally the token
/// contract) using the `proxyPayment` method. /// creation contract) using the `proxyPayment` method.
function () payable { function () payable {
if (controller == 0) throw; if (controller == 0) throw;
if (! TokenCreation(controller).proxyPayment.value(msg.value)(msg.sender)) { if (! TokenCreation(controller).proxyPayment.value(msg.value)(msg.sender)) {