Repository navigation
state: Read the system contract code through the State - #1756
Merged
Merged
Conversation
The system calls read the contract code directly from the state view, bypassing the State they execute on. Read it with State::get_code(), as the code of any other called account.
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1756 +/- ##
==========================================
- Coverage 98.07% 98.06% -0.02%
==========================================
Files 183 183
Lines 16944 16944
Branches 3876 3876
==========================================
- Hits 16618 16616 -2
- Misses 245 246 +1
- Partials 81 82 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes consistently use the active state without introducing correctness issues.
0 open findings
What changed in this PR
Routes system-contract code reads through the active State, ensuring calls use its account view.
Changes:
- Uses
State::get_code()for block-start and block-end system calls.
| File | Description |
|---|---|
test/state/system_contracts.cpp |
Reads system-contract code through the execution state. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The system calls read the contract code directly from the state view,
bypassing the State they execute on. Read it with State::get_code(), as
the code of any other called account.