From f98760f860b136a19c1fe4b19c481618069164ba Mon Sep 17 00:00:00 2001 From: "Daniel A. Nagy" Date: Fri, 10 Apr 2015 15:44:18 +0200 Subject: [PATCH] Proper use of enum --- bzz/bzzcontract/swarm.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bzz/bzzcontract/swarm.sol b/bzz/bzzcontract/swarm.sol index 67685536a5..54022c495d 100644 --- a/bzz/bzzcontract/swarm.sol +++ b/bzz/bzzcontract/swarm.sol @@ -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; }