[#746] Fail emulator on transfers from empty sender
NB: I've opted to make the change in Morley's runtime directly. I'm not aware of any workflows that might break, but I don't claim to know everything. If this might be problematic, we can move the check to Cleveland's side of things, although that would be somewhat more convoluted IMO.
Description
Problem: The real network doesn't allow transfers from implicit addresses with 0 balance. We did explicitly allow this on emulator in issue #15 (closed), however our testing framework changed a lot since then, and this difference in behavior is undesirable.
Solution: Check if a key address is unknown or has no funds on transfer;
fail with EEEmptyImplicitContract
.
Related issue(s)
Resolves #746 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Nikolay Yakimov