Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
make ci fail with insufficient dev-utils marking
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jul 4, 2023
1 parent 6e6d189 commit 1b81a77
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions program-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ thiserror = { workspace = true }

[dev-dependencies]
solana-logger = { workspace = true }
solana-sdk = { workspace = true, features = ["dev-context-only-utils"] }

[lib]
crate-type = ["lib"]
Expand Down
2 changes: 1 addition & 1 deletion programs/zk-token-proof/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ where
return Err(InstructionError::InvalidAccountData);
}

proof_context_account.set_data(context_state_data)?;
proof_context_account.set_data_from_slice(&context_state_data)?;
}

Ok(())
Expand Down
1 change: 1 addition & 0 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ full = [
"sha3",
"digest",
]
dev-context-only-utils = []

[dependencies]
assert_matches = { workspace = true, optional = true }
Expand Down
5 changes: 4 additions & 1 deletion sdk/src/transaction_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,10 @@ impl<'a> BorrowedAccount<'a> {
/// account mapping is enabled.
///
/// Currently only used by tests and the program-test crate.
#[cfg(not(target_os = "solana"))]
#[cfg(all(
not(target_os = "solana"),
any(test, feature = "dev-context-only-utils")
))]
pub fn set_data(&mut self, data: Vec<u8>) -> Result<(), InstructionError> {
self.can_data_be_resized(data.len())?;
self.can_data_be_changed()?;
Expand Down

0 comments on commit 1b81a77

Please sign in to comment.