Skip to content

Commit

Permalink
Expose more types from CMT (solana-labs#3875)
Browse files Browse the repository at this point in the history
* Expose other types from CMT to allow usage on the client side while deserializing accounts.

* adds a convenient creation slot getter
  • Loading branch information
austbot authored and HaoranYi committed Jul 19, 2023
1 parent c00a89c commit 86104ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion account-compression/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spl-account-compression"
version = "0.1.4"
version = "0.1.5"
description = "Solana Program Library Account Compression Program"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ impl ConcurrentMerkleTreeHeader {
}
}

pub fn get_creation_slot(&self) -> u64 {
match &self.header {
ConcurrentMerkleTreeHeaderData::V1(header) => header.creation_slot,
}
}

pub fn set_new_authority(&mut self, new_authority: &Pubkey) {
match self.header {
ConcurrentMerkleTreeHeaderData::V1(ref mut header) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
mod concurrent_merkle_tree_header;
mod path_node;

pub use concurrent_merkle_tree_header::{
ConcurrentMerkleTreeHeader, CONCURRENT_MERKLE_TREE_HEADER_SIZE_V1,
};
pub use concurrent_merkle_tree_header::*;
pub use path_node::PathNode;

0 comments on commit 86104ff

Please sign in to comment.