computablelabs / goest

Golang testing and sandbox for the Computable Protocol. 0xb00.
MIT License
8 stars 0 forks source link

Increment stake in Voting.transferStake #132

Closed rbharath closed 5 years ago

rbharath commented 5 years ago

At present, the transferStake method in Voting.vy (called from resolveChallenge in Listing.vy) overwrites the stake in its destination address (see https://github.com/computablelabs/goest/blob/master/contracts/Listing.vy#L217):

self.stakes[addr][hash] = staked

This can cause errors in flow. In particular, if a maker has successfully fended off two challenges, the stake for their listing will be incorrect. This line should be changed to

self.stakes[addr][hash] += staked
rbharath commented 5 years ago

The line in question is: https://github.com/computablelabs/goest/blob/master/contracts/Voting.vy#L213

rbharath commented 5 years ago

Fixed by #144.

rbharath commented 5 years ago

Re-opening after rollback

rbharath commented 5 years ago

Re-implemented in #169