mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
Proper use of enum
This commit is contained in:
parent
08b8d63c0c
commit
f98760f860
1 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ contract Swarm
|
|||
/// @param time term of Swarm membership in seconds from now.
|
||||
function signup(uint time) {
|
||||
Bee b = swarm[msg.sender];
|
||||
if(b.status == Clean && now + time > now) {
|
||||
if(b.status == Status.Clean && now + time > now) {
|
||||
b.expiry = max(b.expiry, now + time);
|
||||
}
|
||||
b.deposit += msg.value;
|
||||
|
|
@ -38,7 +38,7 @@ contract Swarm
|
|||
/// @dev Only allowed with clean status and expired term.
|
||||
function withdraw() {
|
||||
Bee b = swarm[msg.sender];
|
||||
if(now > b.expiry && b.status == clean) {
|
||||
if(now > b.expiry && b.status == Status.Clean) {
|
||||
msg.sender.send(b.deposit);
|
||||
b.deposit = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue