Add zk_token_sdk_enabled feature to gate Zk Token proof program and sol_zk_token_elgamal_op syscalls

This commit is contained in:
Michael Vines
2022-01-04 22:55:26 -08:00
parent 98e7fada15
commit bb3a1b6b31
17 changed files with 482 additions and 15 deletions

View File

@ -2,7 +2,11 @@ use {
crate::{
hash::Hash,
instruction::{CompiledInstruction, Instruction},
message::{v0::{self, LoadedAddresses}, legacy::Message as LegacyMessage, MessageHeader},
message::{
legacy::Message as LegacyMessage,
v0::{self, LoadedAddresses},
MessageHeader,
},
pubkey::Pubkey,
sanitize::{Sanitize, SanitizeError},
serialize_utils::{append_slice, append_u16, append_u8},

View File

@ -304,9 +304,7 @@ mod tests {
num_readonly_unsigned_accounts: 0,
},
recent_blockhash: Hash::new_unique(),
account_keys: vec![
Pubkey::new_unique(),
],
account_keys: vec![Pubkey::new_unique()],
address_table_lookups: vec![
MessageAddressTableLookup {
account_key: Pubkey::new_unique(),

View File

@ -5,7 +5,7 @@ use {
pubkey::Pubkey,
sysvar,
},
std::{collections::HashSet, ops::Deref, convert::TryFrom},
std::{collections::HashSet, convert::TryFrom, ops::Deref},
};
/// Combination of a version #0 message and its loaded addresses

View File

@ -125,10 +125,7 @@ impl Message {
#[cfg(test)]
mod tests {
use {
super::*,
crate::message::VersionedMessage,
};
use {super::*, crate::message::VersionedMessage};
#[test]
fn test_sanitize() {
@ -251,7 +248,6 @@ mod tests {
.is_err());
}
#[test]
fn test_sanitize_with_max_account_keys() {
assert!(Message {