diff --git a/Cargo.lock b/Cargo.lock index 25df820ef80..6af230e64a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7153,7 +7153,7 @@ checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" [[package]] name = "spl-account-compression" -version = "0.3.1" +version = "0.3.2" dependencies = [ "anchor-lang", "bytemuck", diff --git a/account-compression/programs/account-compression/Cargo.toml b/account-compression/programs/account-compression/Cargo.toml index 123aa5944fc..1993797d233 100644 --- a/account-compression/programs/account-compression/Cargo.toml +++ b/account-compression/programs/account-compression/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spl-account-compression" -version = "0.3.1" +version = "0.3.2" description = "Solana Program Library Account Compression Program" authors = ["Solana Labs Maintainers "] repository = "https://github.com/solana-labs/solana-program-library" diff --git a/account-compression/programs/account-compression/src/concurrent_tree_wrapper.rs b/account-compression/programs/account-compression/src/concurrent_tree_wrapper.rs index 23c518c731f..fce398b5d7b 100644 --- a/account-compression/programs/account-compression/src/concurrent_tree_wrapper.rs +++ b/account-compression/programs/account-compression/src/concurrent_tree_wrapper.rs @@ -86,3 +86,12 @@ pub fn merkle_tree_append_leaf( ) -> Result> { merkle_tree_apply_fn_mut!(header, tree_id, tree_bytes, append, *args) } + +#[inline(never)] +pub fn merkle_tree_prove_tree_is_empty( + header: &ConcurrentMerkleTreeHeader, + tree_id: Pubkey, + tree_bytes: &mut [u8], +) -> Result> { + merkle_tree_apply_fn_mut!(header, tree_id, tree_bytes, prove_tree_is_empty,) +} diff --git a/account-compression/programs/account-compression/src/lib.rs b/account-compression/programs/account-compression/src/lib.rs index 9e22c5daed1..f7226e4d901 100644 --- a/account-compression/programs/account-compression/src/lib.rs +++ b/account-compression/programs/account-compression/src/lib.rs @@ -48,7 +48,6 @@ use crate::noop::wrap_event; use crate::state::{ merkle_tree_get_size, ConcurrentMerkleTreeHeader, CONCURRENT_MERKLE_TREE_HEADER_SIZE_V1, }; -use crate::zero_copy::ZeroCopy; use solana_security_txt::security_txt; /// Exported for Anchor / Solita @@ -482,7 +481,7 @@ pub mod spl_account_compression { let (tree_bytes, canopy_bytes) = rest.split_at_mut(merkle_tree_size); let id = ctx.accounts.merkle_tree.key(); - merkle_tree_apply_fn_mut!(header, id, tree_bytes, prove_tree_is_empty,)?; + merkle_tree_prove_tree_is_empty(&header, id, tree_bytes)?; // Close merkle tree account // 1. Move lamports