From 55ac495ab935debbc275636b2f683491bf787847 Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Sun, 21 May 2017 04:50:59 -0300 Subject: [PATCH] longtail is now called rtail --- contracts/GitHubOracle.sol | 4 ++-- contracts/GitHubPoints.sol | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contracts/GitHubOracle.sol b/contracts/GitHubOracle.sol index 7d2f512..b560332 100644 --- a/contracts/GitHubOracle.sol +++ b/contracts/GitHubOracle.sol @@ -77,11 +77,11 @@ contract GitHubOracle is Controlled, DGitI { gitHubPoints.resume.value(msg.value)(_repository, _branch, _pendingTail, claimedCommit, _token); } - function longtail(string _repository, string _branch, string _token) payable { + function rtail(string _repository, string _branch, string _token) payable { uint256 repoId = repositoryReg.getId(_repository); if(repoId == 0) throw; if(repositoryReg.getBranch(repoId) != sha3(_branch)) throw; - gitHubPoints.longtail.value(msg.value)(_repository, _branch, repositories[repoId].tail, _token); + gitHubPoints.rtail.value(msg.value)(_repository, _branch, repositories[repoId].tail, _token); } function issue(string _repository, string _issue, string _token) payable { diff --git a/contracts/GitHubPoints.sol b/contracts/GitHubPoints.sol index 02dba77..ed2b9ce 100644 --- a/contracts/GitHubPoints.sol +++ b/contracts/GitHubPoints.sol @@ -21,7 +21,7 @@ contract GitHubPoints is Controlled, usingOraclize{ string private cred = ""; string private script = ""; - enum Command { ISSUE, START, UPDATE, RESUME, LONGTAIL } + enum Command { ISSUE, START, UPDATE, RESUME, RTAIL } mapping (bytes32 => Claim) claim; // temporary db struct Claim { Command command; @@ -41,11 +41,11 @@ contract GitHubPoints is Controlled, usingOraclize{ claim[ocid] = Claim({command: Command.UPDATE, branch: _branch, lastCommit: _lastCommit}); } - function longtail(string _repository, string _branch, string _claimedTail, string _cred) + function rtail(string _repository, string _branch, string _claimedTail, string _cred) payable onlyController { if(bytes(_cred).length == 0) _cred = cred; - bytes32 ocid = oraclize_query("nested", _query_longtail(_repository,_branch,_claimedTail,_cred)); - claim[ocid] = Claim({command: Command.LONGTAIL, branch: _branch, lastCommit: ""}); + bytes32 ocid = oraclize_query("nested", _query_rtail(_repository,_branch,_claimedTail,_cred)); + claim[ocid] = Claim({command: Command.RTAIL, branch: _branch, lastCommit: ""}); } function resume(string _repository, string _branch, string _pendingTail, string _claimedCommit, string _cred) @@ -94,7 +94,7 @@ contract GitHubPoints is Controlled, usingOraclize{ dGit.__setHead(projectId,temp); } (temp,pos) = getNextString(v,pos); //temp = scan tail - if(claim.command == Command.START || claim.command == Command.LONGTAIL){ + if(claim.command == Command.START || claim.command == Command.RTAIL){ dGit.__setTail(projectId,temp); } if((claim.command == Command.RESUME || claim.command == Command.UPDATE) && sha3(claim.lastCommit) != sha3(temp)){ @@ -176,13 +176,13 @@ contract GitHubPoints is Controlled, usingOraclize{ return _query_script("resume",comma.join(cm),_cred); } - function _query_longtail(string _repository, string _branch, string _claimedTail, string _cred) internal constant returns (string){ + function _query_rtail(string _repository, string _branch, string _claimedTail, string _cred) internal constant returns (string){ strings.slice memory comma = strings.toSlice(","); strings.slice [] memory cm = new strings.slice[](3); cm[0] = _repository.toSlice(); cm[1] = _branch.toSlice(); cm[2] = _claimedTail.toSlice(); - return _query_script("longtail",comma.join(cm),_cred); + return _query_script("rtail",comma.join(cm),_cred); } function _query_issue(string _repository, string _issue, string _cred) internal returns(string){