-
Notifications
You must be signed in to change notification settings - Fork 466
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
Chore: Small cleanups for clarity #5526
Conversation
cf8f1ee
to
f31d54d
Compare
I'm doing a larger bit of work to enable logicsig cost pooling and I found myself making these changes along the way. It's easier to review by extracting them into their own PR. This does three things. Introduces and uses: ``` func (msig MultisigSig) Signatures() int ``` for the sevral places we need to examine a MultiSig to count the number of sub signatures present. Uses the pre-existing `func (s *Signature) Blank() bool` in many places. Renames `EvalContext.runModeFlags` to simply `EvalContext.runMode` because it takes on a single value, it can't be, for example: `ModeSig | ModeApp`, it must be one or the other.
f31d54d
to
7d2c2d4
Compare
Codecov Report
@@ Coverage Diff @@
## master #5526 +/- ##
==========================================
- Coverage 55.81% 55.79% -0.02%
==========================================
Files 446 446
Lines 63228 63213 -15
==========================================
- Hits 35290 35271 -19
Misses 25572 25572
- Partials 2366 2370 +4
... and 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
looks good
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.
Good improvements
I'm doing a larger bit of work to enable logicsig cost pooling and I found myself making these changes along the way. It's easier to review by extracting them into their own PR. This does four things.
for the several places we need to examine a MultiSig to count the number of sub signatures present.
Uses the pre-existing
func (s *Signature) Blank() bool
in many places.Renames
EvalContext.runModeFlags
to simplyEvalContext.runMode
because it takes on a single value, it can't be, for example:ModeSig | ModeApp
, it must be one or the other.Improves tests by making it so that sample transactions created for versions below
rekeyingEnabledVerion
don't have theirRekeyAddress
set.