[#139] Use a hackier way to compute storage size in client
Description
Problem: currently morley-client
computes storage size incorrectly.
If there are multiple transactions and at least one of them targets
an implicit account it will compute arStorageSize
as Nothing
and eventually we will assume that storage limit is 257 (and add 20
for safety).
But the real storage size consumption can be much greater because
for example a transfer to a smart contract can be involved.
Solution: compute arStorageSize
pessimistically and treat each
Nothing
as 257. We may set higher limit than necessary, but normally
it shouldn't be a problem, especially given that we are currently
using this code only for testing. Storage limit is only a safety
measure.
A better solution is postponed and will be handled in #139 (closed).
At this point I need a hotfix for another project.
Related issue(s)
Relates to #139 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it ← no, it's a hack anyway. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again ← no, it's a hack anyway.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.