Referenced signer passed to block producer

This commit is contained in:
Age Manning
2019-03-30 14:48:43 +11:00
parent deb0abd4a8
commit ba90901730
3 changed files with 16 additions and 15 deletions

View File

@@ -2,7 +2,7 @@ use std::fmt::Display;
use types::{Keypair, PublicKey, Signature};
/// Signs message using an internally-maintained private key.
pub trait Signer: Display + Send + Sync {
pub trait Signer: Display + Send + Sync + Clone {
fn sign_block_proposal(&self, message: &[u8], domain: u64) -> Option<Signature>;
fn sign_randao_reveal(&self, message: &[u8], domain: u64) -> Option<Signature>;
/// Returns a public key for the signer object.