fix feature cfgs

This commit is contained in:
hinto.janai 2024-09-20 17:44:44 -04:00
parent 374bc77cfb
commit 1ad8b34941
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
3 changed files with 0 additions and 6 deletions

View file

@ -22,7 +22,6 @@ hex-literal = { workspace = true, optional = true }
paste = { workspace = true, optional = true } paste = { workspace = true, optional = true }
[dev-dependencies] [dev-dependencies]
monero-serai = { workspace = true }
hex = { workspace = true, features = ["std"] } hex = { workspace = true, features = ["std"] }
pretty_assertions = { workspace = true } pretty_assertions = { workspace = true }

View file

@ -18,13 +18,10 @@ macro_rules! generate_genesis_consts {
$( $(
#[doc = concat!(stringify!([<$network:camel>]), " data.")] #[doc = concat!(stringify!([<$network:camel>]), " data.")]
pub mod [<$network:lower>] { pub mod [<$network:lower>] {
#[cfg(feature = "monero-serai")]
use monero_serai::{block::Block, transaction::Transaction}; use monero_serai::{block::Block, transaction::Transaction};
#[cfg(feature = "monero-serai")]
use std::sync::LazyLock; use std::sync::LazyLock;
#[doc = concat!("The ", stringify!([<$network:lower>]), " genesis block in [`Block`] form.")] #[doc = concat!("The ", stringify!([<$network:lower>]), " genesis block in [`Block`] form.")]
#[cfg(feature = "monero-serai")]
pub static GENESIS_BLOCK: LazyLock<Block> = pub static GENESIS_BLOCK: LazyLock<Block> =
LazyLock::new(|| Block::read(&mut GENESIS_BLOCK_BYTES).unwrap()); LazyLock::new(|| Block::read(&mut GENESIS_BLOCK_BYTES).unwrap());
@ -41,7 +38,6 @@ macro_rules! generate_genesis_consts {
pub const GENESIS_BLOCK_HASH_BYTES: [u8; 32] = hex_literal::hex!($block_hash); pub const GENESIS_BLOCK_HASH_BYTES: [u8; 32] = hex_literal::hex!($block_hash);
#[doc = concat!("The ", stringify!([<$network:lower>]), " genesis block in [`Transaction`] form.")] #[doc = concat!("The ", stringify!([<$network:lower>]), " genesis block in [`Transaction`] form.")]
#[cfg(feature = "monero-serai")]
pub static GENESIS_TX: LazyLock<Transaction> = pub static GENESIS_TX: LazyLock<Transaction> =
LazyLock::new(|| Transaction::read(&mut GENESIS_TX_BYTES).unwrap()); LazyLock::new(|| Transaction::read(&mut GENESIS_TX_BYTES).unwrap());

View file

@ -5,7 +5,6 @@ cfg_if::cfg_if! {
// Used in test modules. // Used in test modules.
if #[cfg(test)] { if #[cfg(test)] {
use hex as _; use hex as _;
use monero_serai as _;
use pretty_assertions as _; use pretty_assertions as _;
} }
} }