[#728] Access MorleyClientEnv in network tests
Description
Problem: we sometimes need to access MorleyClientEnv
in cleveland
network tests. However, due to locking, we can't.
Solution: Introduce NetworkCaps
that carries NetworkEnv
and related
instances/synonyms. Replace ScenarioCleveland
with ScenarioNetwork
.
Reimplement scenario
as a typeclass function lifting the corresponding
ClevelandT
into the appropriate monad. Add some convenience synonyms
to avoid the typeclass constraint proliferation. Finally, instead of
carrying Maybe EmulatedImpl
in misc caps, carry Either EmulatedImpl NetworkEnv
, so that ifEmulation
can access NetworkEnv
as well.
Related issue(s)
Resolves #728 (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