status-network-token icon indicating copy to clipboard operation
status-network-token copied to clipboard

Grifmareview

Open grifma opened this issue 8 years ago • 3 comments
trafficstars

Adding tests.

After pulling the latest changes two (new) tests that were previously ok now throw invalid opcode

Will look into this tomorrow, although these are both cases where a user tries to collect SNT they aren't eligible for, so invalid opcode is perhaps reasonable.

  1. Contract: StatusContribution Does not give SNT if user has no SGT: Error: VM Exception while processing transaction: invalid opcode
  2. Contract: StatusContribution only trade SGT tokens once: Error: VM Exception while processing transaction: invalid opcode

grifma avatar Jun 18 '17 18:06 grifma

That was one of the last changes. If no SNT left for a user, now it throws.
BTW Really thank you to extend the tests...

jbaylina avatar Jun 18 '17 22:06 jbaylina

@janther : “Not allow new SGT tokens to be generated once contribution period has started” This test should not pass, because is theorically possible. SGT can be generated when Status team wants. Before and after the contribution. (edited) The maximum that can receive as a whole is 10% And the distribution used is the one at the end of the finalizationBlock.

jbaylina avatar Jun 19 '17 07:06 jbaylina

@jbaylina the test is now passing and is correct. Apparently undefined is in fact, equal to undefined which was the false positive on the previous test.

Janther avatar Jun 19 '17 23:06 Janther