-
Notifications
You must be signed in to change notification settings - Fork 524
Add GroupID global to TEAL #2649
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -911,7 +911,11 @@ const globalV4TestProgram = globalV3TestProgram + ` | |
| ` | ||
|
|
||
| const globalV5TestProgram = globalV4TestProgram + ` | ||
| // No new globals in v5 | ||
| global GroupID | ||
| int 32 | ||
| bzero | ||
| == | ||
| && | ||
| ` | ||
|
|
||
| func TestGlobal(t *testing.T) { | ||
|
|
@@ -941,6 +945,7 @@ func TestGlobal(t *testing.T) { | |
| CreatorAddress, globalV5TestProgram, | ||
| EvalStateful, CheckStateful, | ||
| }, | ||
| 6: {GroupID, globalV5TestProgram, Eval, Check}, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why does it work, this assumes assembler version 6 but the field defined as version 5 constant This means the test is never called. I'll submit a PR checking |
||
| } | ||
| ledger := makeTestLedger(nil) | ||
| ledger.appID = 42 | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Ideally we should also have a test where GroupID is not empty...
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.
That should be doable with some hacking around in evalStateful_test.go, which builds up some groups with two txns in them.