getScriptsHashesNeeded isn't completely free, since it iterates over scriptsNeeded and constructs a Set of all hashes.
It so happens that this conversion is called twice for all subtransactions:
- once in
SUBUTXOW
- and another in
UTXOW
It will make sense to memoize this computation by adding a field to DijkstraStAnnSubTx:
, dsastScriptsHashesNeeded :: Set ScriptHash
and using it instead in those rules.
That will also require addition to DijkstraEreUTxO of this new accessor:
scriptsHashesNeededStAnnTx :: StAnnTx SubTx era -> Set ScriptHash
getScriptsHashesNeededisn't completely free, since it iterates overscriptsNeededand constructs aSetof all hashes.It so happens that this conversion is called twice for all subtransactions:
SUBUTXOWUTXOWIt will make sense to memoize this computation by adding a field to
DijkstraStAnnSubTx:and using it instead in those rules.
That will also require addition to
DijkstraEreUTxOof this new accessor: