You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are only seeing this because you are running test cases using avmrule with debug mode on,
which can show the exact error in the AVM that causes a failure a transaction. That being said, you are only seeing the assertion error because your test cases are running using AVM(avm.jar) directly.
This is a privilege Java gives us for smart contract development. With our avmrule (debugging tooling), it allows users to test and debug their contracts using JUnit tests. User can use breakpoints to find the exact lines in their contracts that are wrong. In addition, with debug mode, users can understand the issue more and find a way to fix it faster.
If you deploy the contract to the real network, your transaction will JUST be rejected and you will only notice a transaction failure.
I understand what you are saying, but I don't see how it applies here.
In programming, every assert() call should include the name and cell phone number of the programmer who put it there. In the event that assert(false) is called, the programmer gets called, woken up, and they fix it so that assert(false) never happens.
If assert here is being used as a way to point user to an explanation of on error the user made then I recommend an exception, error or other mechanism.
fulldecent
added a commit
to fulldecent/aion-aip040
that referenced
this issue
Aug 21, 2019
Test case:
./mvnw clean install
Expected
AVM never has an assertion failure no matter what customers of AVM do
Actual
AVM has an assertion error
The text was updated successfully, but these errors were encountered: