-
Notifications
You must be signed in to change notification settings - Fork 93
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
Added none operation #1297
Added none operation #1297
Conversation
Resolves #1283 Adds none operation to fields
Codecov Report
@@ Coverage Diff @@
## conduit #1297 +/- ##
===========================================
+ Coverage 58.82% 58.86% +0.03%
===========================================
Files 78 78
Lines 10490 10506 +16
===========================================
+ Hits 6171 6184 +13
- Misses 3786 3788 +2
- Partials 533 534 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
if err != nil { | ||
return data.BlockData{}, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the only bit that isn't covered by the unit tests. What are the failure conditions which would cause the searcher to return an error? Is this conditional something that should never happen or it could happen if you provide an invalid pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just allows the searcher interface to propagate errors if the implementation needs to. A quick example is the microalgos searcher which can return an error if the field is not a microalgo type (sort of belt and suspenders, but I think it is useful).
output, err := fp.Process(bd) | ||
assert.NoError(t, err) | ||
assert.Equal(t, len(output.Payset), 1) | ||
assert.Equal(t, output.Payset[0].SignedTxnWithAD.SignedTxn.Txn.PaymentTxnFields.Receiver, sampleAddr2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe assign the txn to a var and then assert equal on output.Payset[0] and that txn.
Resolves #1283
Adds none operation to fields
Summary
Explain the goal of this change and what problem it is solving. Format this cleanly so that it may be used for a commit message, as your changes will be squash-merged.
Test Plan
How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale.