Make account manager submit deposits

This commit is contained in:
Paul Hauner
2019-11-25 10:51:11 +11:00
parent 4b15d4f433
commit 140a0517a7
7 changed files with 100 additions and 151 deletions

View File

@@ -13,7 +13,7 @@ use std::hash::{Hash, Hasher};
///
/// This struct is a wrapper upon a base type and provides helper functions (e.g., SSZ
/// serialization).
#[derive(Debug, Clone, Eq)]
#[derive(Clone, Eq)]
pub struct FakePublicKey {
bytes: Vec<u8>,
/// Never used, only use for compatibility with "real" `PublicKey`.
@@ -93,6 +93,12 @@ impl fmt::Display for FakePublicKey {
}
}
impl fmt::Debug for FakePublicKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "0x{}", self.as_hex_string())
}
}
impl default::Default for FakePublicKey {
fn default() -> Self {
let secret_key = SecretKey::random();

View File

@@ -81,7 +81,7 @@ impl fmt::Display for PublicKey {
impl fmt::Debug for PublicKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.as_hex_string())
write!(f, "0x{}", self.as_hex_string())
}
}