Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

InvokeContext: Add get_sysvar() helper to sdk #17360

Merged
merged 1 commit into from
May 21, 2021
Merged

Conversation

mvines
Copy link
Contributor

@mvines mvines commented May 20, 2021

programs/bpf_loader/src/syscalls.rs was hoarding a code snippet that's useful to all native programs

  • Also de-mut InvokeContext::get_sysvar_data() to reduce fights with the borrow checker
  • Also add mock_set_sysvar() for unit test convenience

jackcmay
jackcmay previously approved these changes May 20, 2021
@mergify mergify bot dismissed jackcmay’s stale review May 20, 2021 23:12

Pull request has been modified.

@mvines mvines added the automerge Merge this Pull Request automatically once CI passes label May 21, 2021
@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #17360 (5d63086) into master (a1a0d6f) will decrease coverage by 0.0%.
The diff coverage is 38.4%.

@@            Coverage Diff            @@
##           master   #17360     +/-   ##
=========================================
- Coverage    82.7%    82.7%   -0.1%     
=========================================
  Files         424      424             
  Lines      118353   118361      +8     
=========================================
+ Hits        97906    97909      +3     
- Misses      20447    20452      +5     

@mergify mergify bot merged commit 2c99b23 into solana-labs:master May 21, 2021
mergify bot added a commit that referenced this pull request May 21, 2021
* Add get_sysvar() helper to sdk

(cherry picked from commit 2c99b23)

# Conflicts:
#	runtime/src/message_processor.rs
#	sdk/src/process_instruction.rs

* Resolve conflicts

Co-authored-by: Michael Vines <mvines@gmail.com>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants