mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Few obvious bugs fixed: time overflow, unnecessary term extension, missing deposit zeroing.
This commit is contained in:
parent
b3af2579d2
commit
abec44cb9b
1 changed files with 2 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ contract Swarm
|
|||
|
||||
function signup(uint time) {
|
||||
Bee b = swarm[msg.sender];
|
||||
b.expiry = max(b.expiry, now) + time;
|
||||
if(now + time > now) b.expiry = max(b.expiry, now + time);
|
||||
b.deposit += msg.value;
|
||||
}
|
||||
|
||||
|
|
@ -23,6 +23,7 @@ contract Swarm
|
|||
Bee b = swarm[msg.sender];
|
||||
if(now > b.expiry) {
|
||||
msg.sender.send(b.deposit);
|
||||
b.deposit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue