Skip to content

Commit

Permalink
Rename "everything" feature to "full"
Browse files Browse the repository at this point in the history
(cherry picked from commit 0cc9c94)
  • Loading branch information
mvines committed Oct 24, 2020
1 parent eb9cef0 commit 712267b
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 17 deletions.
5 changes: 2 additions & 3 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ edition = "2018"
# solana-program crate
program = []

# "everything" includes functionality that is not compatible or needed for on-chain programs
default = [
"everything"
"full" # functionality that is not compatible or needed for on-chain programs
]
everything = [
full = [
"assert_matches",
"byteorder",
"chrono",
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! Asynchronous implementations are expected to create transactions, sign them, and send
//! them but without waiting to see if the server accepted it.
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use crate::{
account::Account,
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/genesis_config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! The `genesis_config` module is a library for generating the chain's genesis config.
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use crate::{
account::Account,
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hard_forks.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! The `hard_forks` module is used to maintain the list of slot boundaries for when a hard fork
//! should occur.
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use byteorder::{ByteOrder, LittleEndian};
use solana_sdk::clock::Slot;
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hash.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub use solana_program::hash::*;

/// random hash value for tests and benchmarks.
#[cfg(feature = "everything")]
#[cfg(feature = "full")]
pub fn new_rand<R: ?Sized>(rng: &mut R) -> Hash
where
R: rand::Rng,
Expand Down
6 changes: 3 additions & 3 deletions sdk/src/pubkey.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pub use solana_program::pubkey::*;

/// New random Pubkey for tests and benchmarks.
#[cfg(feature = "everything")]
#[cfg(feature = "full")]
pub fn new_rand() -> Pubkey {
Pubkey::new(&rand::random::<[u8; 32]>())
}

#[cfg(feature = "everything")]
#[cfg(feature = "full")]
pub fn write_pubkey_file(outfile: &str, pubkey: Pubkey) -> Result<(), Box<dyn std::error::Error>> {
use std::io::Write;

Expand All @@ -22,7 +22,7 @@ pub fn write_pubkey_file(outfile: &str, pubkey: Pubkey) -> Result<(), Box<dyn st
Ok(())
}

#[cfg(feature = "everything")]
#[cfg(feature = "full")]
pub fn read_pubkey_file(infile: &str) -> Result<Pubkey, Box<dyn std::error::Error>> {
let f = std::fs::File::open(infile.to_string())?;
let printable: String = serde_json::from_reader(f)?;
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/secp256k1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use digest::Digest;
use serde_derive::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/shred_version.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use solana_sdk::{
hard_forks::HardForks,
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/signature.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! The `signature` module provides functionality for public, and private keys.
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use crate::{pubkey::Pubkey, transaction::TransactionError};
use ed25519_dalek::Signer as DalekSigner;
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/signers.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(feature = "everything")]
#![cfg(feature = "full")]
use crate::{
pubkey::Pubkey,
signature::{Signature, Signer, SignerError},
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/system_transaction.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! The `system_transaction` module provides functionality for creating system transactions.
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use crate::{
hash::Hash,
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/transaction.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Defines a Transaction type to package an atomic sequence of instructions.
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use crate::sanitize::{Sanitize, SanitizeError};
use crate::secp256k1::verify_eth_addresses;
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/transport.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(feature = "everything")]
#![cfg(feature = "full")]

use crate::transaction::TransactionError;
use std::io;
Expand Down

0 comments on commit 712267b

Please sign in to comment.