forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdk: Extract last-restart-slot crate (#3272)
* sdk: Extract last-restart-slot crate #### Problem Just about all of the sysvars have been extract in some way from solana-program, but the last restart slot sysvar has not. #### Summary of changes Following most of the other crates that have done this, move it out. * Remove last_restart_slot.rs
- Loading branch information
Showing
8 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[package] | ||
name = "solana-last-restart-slot" | ||
description = "Types and utilities for the Solana LastRestartSlot sysvar." | ||
documentation = "https://docs.rs/solana-last-restart-slot" | ||
version = { workspace = true } | ||
authors = { workspace = true } | ||
repository = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
edition = { workspace = true } | ||
|
||
[dependencies] | ||
serde = { workspace = true, optional = true } | ||
serde_derive = { workspace = true, optional = true } | ||
solana-sdk-macro = { workspace = true } | ||
|
||
[features] | ||
serde = ["dep:serde", "dep:serde_derive"] | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
all-features = true | ||
rustdoc-args = ["--cfg=docsrs"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! Information about the last restart slot (hard fork). | ||
#![cfg_attr(docsrs, feature(doc_auto_cfg))] | ||
|
||
use solana_sdk_macro::CloneZeroed; | ||
|
||
#[repr(C)] | ||
#[cfg_attr( | ||
feature = "serde", | ||
derive(serde_derive::Deserialize, serde_derive::Serialize) | ||
)] | ||
#[derive(Debug, CloneZeroed, PartialEq, Eq, Default)] | ||
pub struct LastRestartSlot { | ||
/// The last restart `Slot`. | ||
pub last_restart_slot: u64, | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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