contract call abortion not rejecting promise
Closed this issue · 2 comments
Describe the bug
there seems to have an issue with node 7.1.0, e.g. for the following contract entrypoint
entrypoint get() : int =
switch(state)
None => abort("NOTHING_SET_YET")
Some(var) => var
I have a test for the abort case, this on v7.0.0 this works fine
with v7.1.0 the test fails with AssertionError: expected promise to be rejected with an error including 'NOTHING_SET_YET' but it was fulfilled with { type: 'contract_call', …(8) }\n"
To Reproduce
e.g. using aeproject
aeproject init --next -y test-dir
"--next" to use the latest node version
cd test-dir && aeproject env && aeproject test
fails the example test case
Expected behavior
contract call to reject the promise
AssertionError: expected promise to be rejected with an error including 'NOTHING_SET_YET' but it was fulfilled with { type: 'contract_call', …(8) }
It returns 42
set in the previous test.
If I execute "ExampleContract: get undefined when not set before" before "ExampleContract: set and get" then it works, so the issue is in the dev mode's rollback.
aeternity/aeternity#4376
ahhh right, didn't conclude this was the same issue, thanks for pointing this out