diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index 1a25f85d221..9b59fa3671c 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -180,3 +180,6 @@ required-features = ["bench"] [[bench]] name = "redpallas" harness = false + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("nsm"))'] } diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index f830631aba3..89ed9750ec5 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -99,3 +99,7 @@ tracing-subscriber = "0.3.18" zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40", features = ["proptest-impl"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["proptest-impl"] } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40" } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("nsm"))'] } + diff --git a/zebra-consensus/src/block/tests.rs b/zebra-consensus/src/block/tests.rs index 9c317c131aa..030b3e15abd 100644 --- a/zebra-consensus/src/block/tests.rs +++ b/zebra-consensus/src/block/tests.rs @@ -305,8 +305,7 @@ fn subsidy_is_valid_for_network(network: Network) -> Result<(), Report> { // TODO: first halving, second halving, third halving, and very large halvings if height >= canopy_activation_height { let expected_block_subsidy = - subsidy::general::block_subsidy(height, &network) - .expect("valid block subsidy"); + subsidy::general::block_subsidy(height, &network).expect("valid block subsidy"); check::subsidy_is_valid(&block, &network, expected_block_subsidy) .expect("subsidies should pass for this block"); @@ -344,8 +343,7 @@ fn coinbase_validation_failure() -> Result<(), Report> { let expected = BlockError::NoTransactions; assert_eq!(expected, result); - let result = - check::subsidy_is_valid(&block, &network, expected_block_subsidy).unwrap_err(); + let result = check::subsidy_is_valid(&block, &network, expected_block_subsidy).unwrap_err(); let expected = BlockError::Transaction(TransactionError::Subsidy(SubsidyError::NoCoinbase)); assert_eq!(expected, result); @@ -371,8 +369,7 @@ fn coinbase_validation_failure() -> Result<(), Report> { let expected = BlockError::Transaction(TransactionError::CoinbasePosition); assert_eq!(expected, result); - let result = - check::subsidy_is_valid(&block, &network, expected_block_subsidy).unwrap_err(); + let result = check::subsidy_is_valid(&block, &network, expected_block_subsidy).unwrap_err(); let expected = BlockError::Transaction(TransactionError::Subsidy(SubsidyError::NoCoinbase)); assert_eq!(expected, result); @@ -433,8 +430,7 @@ fn funding_stream_validation_for_network(network: Network) -> Result<(), Report> if height >= canopy_activation_height { let block = Block::zcash_deserialize(&block[..]).expect("block should deserialize"); let expected_block_subsidy = - subsidy::general::block_subsidy(height, &network) - .expect("valid block subsidy"); + subsidy::general::block_subsidy(height, &network).expect("valid block subsidy"); // Validate let result = check::subsidy_is_valid(&block, &network, expected_block_subsidy); @@ -555,14 +551,11 @@ fn miner_fees_validation_failure() -> Result<(), Report> { let height = block.coinbase_height().expect("valid coinbase height"); let expected_block_subsidy = block_subsidy(height, &network)?; // TODO: Add link to lockbox stream ZIP - let expected_deferred_amount = subsidy::funding_streams::funding_stream_values( - height, - &network, - expected_block_subsidy, - ) - .expect("we always expect a funding stream hashmap response even if empty") - .remove(&FundingStreamReceiver::Deferred) - .unwrap_or_default(); + let expected_deferred_amount = + subsidy::funding_streams::funding_stream_values(height, &network, expected_block_subsidy) + .expect("we always expect a funding stream hashmap response even if empty") + .remove(&FundingStreamReceiver::Deferred) + .unwrap_or_default(); assert_eq!( check::miner_fees_are_valid( diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index d8551e78875..ce07b4654c9 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -97,3 +97,6 @@ toml = "0.8.19" zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] } zebra-test = { path = "../zebra-test/" } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("nsm"))'] } diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index ad35c00be3f..2c189efe042 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -138,3 +138,7 @@ zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40", features = [ ] } zebra-test = { path = "../zebra-test", version = "1.0.0-beta.40" } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("nsm"))'] } + diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index f484fb57489..4dd2675bb1a 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -116,3 +116,6 @@ tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["proptest-impl"] } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40" } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("nsm"))'] } diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 4b7264bc3e8..76041b9e491 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -301,4 +301,4 @@ zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.7" } zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.40" } [lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)', 'cfg(zcash_unstable, values("nsm"))'] }