@@ -72,7 +72,7 @@ contract SimpleOperations is Operations {
7272 // Functions for client owners
7373
7474 function setClientOwner (address _newOwner )
75- public
75+ external
7676 onlyClientOwner
7777 notClientOwner (_newOwner)
7878 {
@@ -95,7 +95,7 @@ contract SimpleOperations is Operations {
9595 uint24 _semver ,
9696 bool _critical
9797 )
98- public
98+ external
9999 onlyClientOwner
100100 {
101101 require (_track != 0 && _semver != 0 );
@@ -123,7 +123,7 @@ contract SimpleOperations is Operations {
123123 /// multiple times (with different parameters), therefore the `ChecksumAdded` event can be
124124 /// emitted multiple times for the same checksum.
125125 function addChecksum (bytes32 _release , bytes32 _platform , bytes32 _checksum )
126- public
126+ external
127127 onlyClientOwner
128128 {
129129 bytes32 newClient = clientOwner[msg .sender ];
@@ -141,7 +141,7 @@ contract SimpleOperations is Operations {
141141 // Admin functions
142142
143143 function setClient (bytes32 _client , address _owner )
144- public
144+ external
145145 onlyOwner
146146 notClientOwner (_owner)
147147 {
@@ -159,7 +159,7 @@ contract SimpleOperations is Operations {
159159 // the data. If a removed client is then re-added (with `setClient`) all of the previous release
160160 // and build information is available and returned by the getters.
161161 function removeClient (bytes32 _client )
162- public
162+ external
163163 onlyOwner
164164 {
165165 address owner = client[_client].owner;
@@ -168,15 +168,15 @@ contract SimpleOperations is Operations {
168168 }
169169
170170 function setLatestFork (uint32 _forkNumber )
171- public
171+ external
172172 onlyOwner
173173 {
174174 emit ForkRatified (_forkNumber);
175175 latestFork = _forkNumber;
176176 }
177177
178178 function setOwner (address _newOwner )
179- public
179+ external
180180 onlyOwner
181181 {
182182 emit OwnerChanged (grandOwner, _newOwner);
@@ -186,39 +186,16 @@ contract SimpleOperations is Operations {
186186 // Getters
187187
188188 function isLatest (bytes32 _client , bytes32 _release )
189- public
189+ external
190190 view
191191 returns (bool )
192192 {
193- return clientExists (_client) && latestInTrack (_client, track (_client, _release)) == _release;
194- }
195-
196- function track (bytes32 _client , bytes32 _release )
197- public
198- view
199- returns (uint8 )
200- {
201- if (clientExists (_client)) {
202- return client[_client].release[_release].track;
203- } else {
204- return 0 ;
205- }
206- }
207-
208- function latestInTrack (bytes32 _client , uint8 _track )
209- public
210- view
211- returns (bytes32 )
212- {
213- if (clientExists (_client)) {
214- return client[_client].current[_track];
215- } else {
216- return 0 ;
217- }
193+ return clientExists (_client) &&
194+ latestInTrack (_client, track (_client, _release)) == _release;
218195 }
219196
220197 function build (bytes32 _client , bytes32 _checksum )
221- public
198+ external
222199 view
223200 returns (bytes32 o_release , bytes32 o_platform )
224201 {
@@ -233,7 +210,7 @@ contract SimpleOperations is Operations {
233210 }
234211
235212 function release (bytes32 _client , bytes32 _release )
236- public
213+ external
237214 view
238215 returns (
239216 uint32 o_forkBlock ,
@@ -257,7 +234,7 @@ contract SimpleOperations is Operations {
257234 }
258235
259236 function checksum (bytes32 _client , bytes32 _release , bytes32 _platform )
260- public
237+ external
261238 view
262239 returns (bytes32 )
263240 {
@@ -269,21 +246,45 @@ contract SimpleOperations is Operations {
269246 }
270247
271248 function latestFork ()
272- public
249+ external
273250 view
274251 returns (uint32 )
275252 {
276253 return latestFork;
277254 }
278255
279256 function clientOwner (address _owner )
280- public
257+ external
281258 view
282259 returns (bytes32 )
283260 {
284261 return clientOwner[_owner];
285262 }
286263
264+ function track (bytes32 _client , bytes32 _release )
265+ public
266+ view
267+ returns (uint8 )
268+ {
269+ if (clientExists (_client)) {
270+ return client[_client].release[_release].track;
271+ } else {
272+ return 0 ;
273+ }
274+ }
275+
276+ function latestInTrack (bytes32 _client , uint8 _track )
277+ public
278+ view
279+ returns (bytes32 )
280+ {
281+ if (clientExists (_client)) {
282+ return client[_client].current[_track];
283+ } else {
284+ return 0 ;
285+ }
286+ }
287+
287288 // Internals
288289
289290 function clientExists (bytes32 _client )
0 commit comments