From 37e861f6eaa9e91519a56c47a1e4e233af154516 Mon Sep 17 00:00:00 2001 From: eauge Date: Fri, 15 Feb 2019 10:31:32 -0800 Subject: [PATCH] key manager not undead code --- .buildkite/rust/lint.txt | 2 +- common/src/confidential/key_manager.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.buildkite/rust/lint.txt b/.buildkite/rust/lint.txt index 67d9ed104..abeb73c7d 100644 --- a/.buildkite/rust/lint.txt +++ b/.buildkite/rust/lint.txt @@ -29,4 +29,4 @@ while-true # unused-extern-crates # unused-import-braces # unused-qualifications -# unused-results +unused-results diff --git a/common/src/confidential/key_manager.rs b/common/src/confidential/key_manager.rs index 45d110aac..72558273e 100644 --- a/common/src/confidential/key_manager.rs +++ b/common/src/confidential/key_manager.rs @@ -41,21 +41,19 @@ impl KeyManagerClient { } } -#[allow(dead_code)] +#[cfg(not(feature = "test"))] #[derive(Debug)] /// Wrapper around the Ekiden key manager client to provide a more convenient /// Ethereum address based interface along with runtime-specific utility methods. struct KeyManager; impl KeyManager { - #[allow(dead_code)] /// Returns the contract id for the given contract address. The contract_id /// is used to fetch keys for a contract. fn contract_id(contract: Address) -> ContractId { ContractId::from(&keccak(contract.to_vec())[..]) } - #[allow(dead_code)] /// Creates and returns the long term public key for the given contract. /// If the key already exists, returns the existing key. /// Returns the tuple (public_key, signature_{KeyManager}(public_key)). @@ -77,7 +75,6 @@ impl KeyManager { }) } - #[allow(dead_code)] fn contract_key(address: Address) -> Result { let contract_id = Self::contract_id(address); let mut km = EkidenKeyManager::instance().expect("Should always have a key manager client");