massalabs / massa

The Decentralized and Scaled Blockchain
https://massa.net
5.57k stars 711 forks source link

Fix ledger change to take into account cancelled message balance change #4715

Closed Leo-Besancon closed 3 months ago

Leo-Besancon commented 3 months ago

The ledger changes returned when settling the slot did not take into account the async message cancellation.

I'll try and add a TU to confirm everything is working

bilboquet commented 3 months ago

You may want to add a small UT to cover this case :)

Leo-Besancon commented 3 months ago

You may want to add a small UT to cover this case :)

The problem here is that I didn't find a clean way to test the speculative ledger in the execution tests (the test universe seems to only have a handle on the final state). I'll dig a bit deeper on that

bilboquet commented 3 months ago

The problem here is that I didn't find a clean way to test the speculative ledger in the execution tests (the test universe seems to only have a handle on the final state). I'll dig a bit deeper on that

If you can't find your way in UT, maybe it's doable with functional tests? (just an idea).

Leo-Besancon commented 3 months ago

I'll prepare a functional test with a scenario to test both this PR and https://github.com/massalabs/massa/pull/4718.