Cargo update (#337)

This commit is contained in:
Yeastplume
2020-02-18 10:23:33 +00:00
committed by GitHub
parent 4774704aeb
commit b2c973fd0b
7 changed files with 175 additions and 181 deletions
+4 -4
View File
@@ -72,7 +72,7 @@ fn private_ctx_xor_keys<K>(
where
K: Keychain,
{
let root_key = keychain.derive_key(0, &K::root_key_id(), &SwitchCommitmentType::Regular)?;
let root_key = keychain.derive_key(0, &K::root_key_id(), SwitchCommitmentType::Regular)?;
// derive XOR values for storing secret values in DB
// h(root_key|slate_id|"blind")
@@ -188,7 +188,7 @@ where
use_test_rng: bool,
) -> Result<Option<SecretKey>, Error> {
// store hash of master key, so it can be verified later after unmasking
let root_key = k.derive_key(0, &K::root_key_id(), &SwitchCommitmentType::Regular)?;
let root_key = k.derive_key(0, &K::root_key_id(), SwitchCommitmentType::Regular)?;
let mut hasher = Blake2b::new(SECRET_KEY_SIZE);
hasher.update(&root_key.0[..]);
self.master_checksum = Box::new(Some(hasher.finalize()));
@@ -233,7 +233,7 @@ where
}
// Check if master seed is what is expected (especially if it's been xored)
let root_key =
k_masked.derive_key(0, &K::root_key_id(), &SwitchCommitmentType::Regular)?;
k_masked.derive_key(0, &K::root_key_id(), SwitchCommitmentType::Regular)?;
let mut hasher = Blake2b::new(SECRET_KEY_SIZE);
hasher.update(&root_key.0[..]);
if *self.master_checksum != Some(hasher.finalize()) {
@@ -265,7 +265,7 @@ where
} else {*/
Ok(Some(util::to_hex(
self.keychain(keychain_mask)?
.commit(amount, &id, &SwitchCommitmentType::Regular)?
.commit(amount, &id, SwitchCommitmentType::Regular)?
.0
.to_vec(), // TODO: proper support for different switch commitment schemes
)))
+1 -1
View File
@@ -110,7 +110,7 @@ impl Client {
/// Helper function to easily issue a HTTP GET request against a given URL that
/// returns a JSON object. Handles request building, JSON deserialization and
/// response code checking.
pub fn get<'a, T>(&self, url: &'a str, api_secret: Option<String>) -> Result<T, Error>
pub fn _get<'a, T>(&self, url: &'a str, api_secret: Option<String>) -> Result<T, Error>
where
for<'de> T: Deserialize<'de>,
{