As a user of the Mockchain in testing, I want to be able to resolve the transaction inputs of some Tx.
By resolve, I mean going from C.TxIn to C.TxOut era. This is typically done by a chain-indexer, but the Mockchain should be capable of doing so. Currently, we are able to resolve C.TxIn, but only if they are unspent.
Possible solution
Similar to mscDatums, should we separately index the transaction outputs instead of using mcsPoolState?
For example, we can add another field in MockchainState such as Map C.TxIn (C.TxOut ERA)? Then, we can also use that to resolve the TxIn in utxoByTxIn function of MonadBlockchain.
As a user of the
Mockchainin testing, I want to be able to resolve the transaction inputs of someTx.By resolve, I mean going from
C.TxIntoC.TxOut era. This is typically done by a chain-indexer, but the Mockchain should be capable of doing so. Currently, we are able to resolveC.TxIn, but only if they are unspent.Possible solution
Similar to
mscDatums, should we separately index the transaction outputs instead of usingmcsPoolState?For example, we can add another field in
MockchainStatesuch asMap C.TxIn (C.TxOut ERA)? Then, we can also use that to resolve theTxIninutxoByTxInfunction ofMonadBlockchain.