Skip to content

Conversation

@nventuro
Copy link
Contributor

The old tests were downright bizarre: the new suite better shows how bounty can be claimed after a vulnerability is exploited. Also, coverage should now be 100%.

@nventuro nventuro added kind:improvement tests Test suite and helpers. labels Sep 25, 2018
@nventuro nventuro requested a review from frangio September 25, 2018 21:16
contract SecureInvariantTargetMock is Target {
function checkInvariant() public returns(bool) {
contract TargetMock is Target {
bool private pwned;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, change to exploited or something less 1337.

});
});
it('can set reward', async function () {
await sendReward(owner, this.bounty.address, reward);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this sendReward name. What would you think of dropping the function and just calling web3.eth.sendTransaction?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #1358

@frangio frangio added this to the v2.0 milestone Sep 26, 2018
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@frangio frangio merged commit ae109f6 into OpenZeppelin:master Sep 26, 2018
frangio pushed a commit that referenced this pull request Sep 26, 2018
* Improved bounty tests.

* Fixed linter errors.

* Addressed review comments.

(cherry picked from commit ae109f6)
@nventuro nventuro deleted the bounty-tests branch September 26, 2018 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Test suite and helpers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants