Skip to content

Commit

Permalink
fix stack frame violation
Browse files Browse the repository at this point in the history
  • Loading branch information
ngundotra committed Oct 17, 2024
1 parent 3acbbd4 commit 1277be9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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.3.1"
version = "0.3.2"
description = "Solana Program Library Account Compression Program"
authors = ["Solana Labs Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana-program-library"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,12 @@ pub fn merkle_tree_append_leaf(
) -> Result<Box<ChangeLogEvent>> {
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<Box<ChangeLogEvent>> {
merkle_tree_apply_fn_mut!(header, tree_id, tree_bytes, prove_tree_is_empty,)
}
3 changes: 1 addition & 2 deletions account-compression/programs/account-compression/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1277be9

Please sign in to comment.