Skip to content

Commit

Permalink
Use consistent order of staker/stakee (ConsenSys).
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed Nov 19, 2019
1 parent dfdab58 commit 1cfef88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dir-ethereum/directory.sol
Expand Up @@ -149,7 +149,7 @@ contract OrchidDirectory {
event Update(address indexed staker, address stakee, uint128 amount);
event Update(address indexed stakee, uint128 amount);

function lift(bytes32 key, Stake storage stake, uint128 amount, address stakee, address staker) private {
function lift(bytes32 key, Stake storage stake, uint128 amount, address staker, address stakee) private {
uint128 local = stake.amount_;
local += amount;
stake.amount_ = local;
Expand Down Expand Up @@ -190,7 +190,7 @@ contract OrchidDirectory {
stake.stakee_ = stakee;
}

lift(key, stake, amount, stakee, staker);
lift(key, stake, amount, staker, stakee);
}

function push(address stakee, uint128 amount, uint128 delay) external {
Expand Down Expand Up @@ -257,7 +257,7 @@ contract OrchidDirectory {
require(stake.amount_ != 0);
require(stake.amount_ >= amount);

lift(key, stake, -amount, stakee, staker);
lift(key, stake, -amount, staker, stakee);

if (stake.amount_ == 0) {
Primary storage pivot = turn(key, stake);
Expand Down

0 comments on commit 1cfef88

Please sign in to comment.