You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/pinocchio/src/sysvars/mod.rs
+23-4Lines changed: 23 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,19 @@ pub mod fees;
11
11
pubmod instructions;
12
12
pubmod rent;
13
13
14
+
/// Return value indicating that the `offset + length` is greater than the length of
15
+
/// the sysvar data.
16
+
//
17
+
// Defined in the bpf loader as [`OFFSET_LENGTH_EXCEEDS_SYSVAR`](https://github.com/anza-xyz/agave/blob/master/programs/bpf_loader/src/syscalls/sysvar.rs#L172).
18
+
#[cfg(target_os = "solana")]
19
+
constOFFSET_LENGTH_EXCEEDS_SYSVAR:u64 = 1;
20
+
21
+
/// Return value indicating that the sysvar was not found.
22
+
//
23
+
// Defined in the bpf loader as [`SYSVAR_NOT_FOUND`](https://github.com/anza-xyz/agave/blob/master/programs/bpf_loader/src/syscalls/sysvar.rs#L171).
24
+
#[cfg(target_os = "solana")]
25
+
constSYSVAR_NOT_FOUND:u64 = 2;
26
+
14
27
/// A type that holds sysvar data.
15
28
pubtraitSysvar:Default + Sized{
16
29
/// Load the sysvar directly from the runtime.
@@ -41,9 +54,12 @@ macro_rules! impl_sysvar_get {
41
54
let result = core::hint::black_box(var_addr as*const _ asu64);
0 commit comments