Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Commit

Permalink
key manager not undead code
Browse files Browse the repository at this point in the history
  • Loading branch information
eauge committed Feb 15, 2019
1 parent b3d38a3 commit 37e861f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .buildkite/rust/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ while-true
# unused-extern-crates
# unused-import-braces
# unused-qualifications
# unused-results
unused-results
5 changes: 1 addition & 4 deletions common/src/confidential/key_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand All @@ -77,7 +75,6 @@ impl KeyManager {
})
}

#[allow(dead_code)]
fn contract_key(address: Address) -> Result<ContractKey, String> {
let contract_id = Self::contract_id(address);
let mut km = EkidenKeyManager::instance().expect("Should always have a key manager client");
Expand Down

0 comments on commit 37e861f

Please sign in to comment.