Open catch-21 opened 2 years ago
Indeed emulatorState
only recreates the chainState
of an EmulatorState
. Its main purpose is to perform a partial initialisation of the EmulatorState
when we start the emulator, not to provide access to the whole emulatorState
.
Its behaviour is aligned with the behaviour of the other initializer: create the chain index and update the wallets through the EmulatorEvent
s. In this particular case, as we don't replay the events on the newly (re)created state, the wallet list is empty.
We have already discussed the need to clean up and clarify the API, especially to clarify which parts of it are public. I think it's a pretty good example of it. I suggest that we remove the test, close the bug and that we initiate an action item (epic or story (?)) about cleaning and clarifying the API.
Summary
Using the Emulator's ChainState to produce an EmulatorState results in an empty WalletState Map. This is probably minor because there is
agentState
for this purpose, but still good to investigate.Steps to reproduce the behavior
There is a commented out test to recreate this bug, see here. Please re-enable once fixed.
Actual Result
Expected Result
It is possible to get all
TxOutRef
for any wallet from Trace's ChainState.Describe the approach you would take to fix this
No response
System info
https://github.com/input-output-hk/plutus-apps/commit/a8540dbc92ecf5e6883eb30e3c47efab3f35b446