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

Ensure that AssetCreator is not used before proto.LogicSigVersion=5 #2784

Merged
merged 3 commits into from
Aug 23, 2021

Conversation

jannotti
Copy link
Contributor

This also unifies a lot of field handling so that the code is less
susceptible to copy-paste errors, but it has a ways to go. Hard to
both unify the handling of the different fields and use separate
types for each field index. Lots and lots of interfaces could do. Or
generics in 6 months? For the moment, each field type is a pile of
arrays and maps working together.

It's unclear what we gain from those separate index types, since
we always cast into the type just before using them, as we are
getting the indexes from reading a byte in bytecode.

New tests will catch this mistake if we make it again.

This also unifies a lot of field handling so that the code is less
susceptible to copy-paste errors, but it has a ways to go.  Hard to
both unify the handling of the different fields and use separate
types for each field index.  Lots and lots of interfaces could do. Or
generics in 6 months?  For the moment, each field type is a pile of
arrays and maps working together.

It's unclear what we gain from those separate index types, since
we *always* cast into the type just before using them, as we are
getting the indexes from reading a byte in bytecode.
@tsachiherman tsachiherman merged commit 0d6a2a9 into algorand:master Aug 23, 2021
algojack pushed a commit to algojack/go-algorand that referenced this pull request Aug 24, 2021
…lgorand#2784)

This also unifies a lot of field handling so that the code is less
susceptible to copy-paste errors, but it has a ways to go. Hard to
both unify the handling of the different fields and use separate
types for each field index. Lots and lots of interfaces could do. Or
generics in 6 months? For the moment, each field type is a pile of
arrays and maps working together.

It's unclear what we gain from those separate index types, since
we always cast into the type just before using them, as we are
getting the indexes from reading a byte in bytecode.

New tests will catch this mistake if we make it again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants