Skip to content

[#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

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Nikolay Yakimov

Merge request reports