Post
Topic
Board Service Announcements (Altcoins)
Re: [ETH] Highlander
by
etherauction
on 03/04/2016, 17:56:36 UTC
Edit: The code seems to act as described, albeit it's rather hairy, inefficient, and poorly written.

Well I'm still learning here  Roll Eyes
[/quote]

If you want a quick codereview:

 - There's no need for the struct, since it's only got one element in it.
 - You don't actually need to store anything other than the most recent address. There's no need for an array here.
 - CurrentTime and current_Balance don't need to be storage variables.
 - 'now' doesn't change during the execution of the transaction, so there's no need to store it in a variable at all.
 - You never read from 'current_Balance', and it's always equal to this.balance, so there's no need to have that variable, either.
 - If you declare the relevant variables public, you don't need the accessor functions CT()/PT()/bal().

All that said, it seems conceptually sound, which is a step up over a lot of contracts in this forum. Wink