Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve collectNNScriptInputs #2210

Merged
merged 1 commit into from
Apr 13, 2021
Merged

Improve collectNNScriptInputs #2210

merged 1 commit into from
Apr 13, 2021

Conversation

TimSheard
Copy link
Contributor

The function collectNNSctiptInputs, collects inputs for Plutus scripts. If any of the inputs are not found, the script is just dropped from the output.

The better version, returns an either type

  1. Either a collection of all the scripts and there inputs (iff all script inputs can be found)
  2. A list of errors, which detail what inputs could not be found.

Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! The only thing I'd like to think a bit more about is how to make it clear that we don't ever expect to encounter these errors...

@TimSheard TimSheard force-pushed the ts-better-collectNNScriptInputs branch from 49170dd to de6d6d4 Compare April 8, 2021 17:58
collectNNScriptInputs has been renamed to collectTwoPhaseScriptInputs.
It now collects errors, rather than dropping scripts whose inputs can't be found.
In the Utxos rule, we call this before we evalScripts.
@TimSheard TimSheard force-pushed the ts-better-collectNNScriptInputs branch from de6d6d4 to a7576af Compare April 9, 2021 18:00
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nc6 nc6 merged commit 9405536 into master Apr 13, 2021
@iohk-bors iohk-bors bot deleted the ts-better-collectNNScriptInputs branch April 13, 2021 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants