add a path to submit seal from engine

This commit is contained in:
keorn
2016-11-16 15:56:16 +00:00
parent 3b0d5503b1
commit 51bbad66d0
4 changed files with 26 additions and 4 deletions

View File

@@ -116,6 +116,15 @@ impl Tendermint {
}
}
fn submit_seal(&self, block_hash: H256, seal: Vec<Bytes>) {
if let Some(ref channel) = *self.message_channel.lock() {
match channel.send(ClientIoMessage::SubmitSeal(block_hash, seal)) {
Ok(_) => trace!(target: "poa", "timeout: SubmitSeal message sent."),
Err(err) => warn!(target: "poa", "timeout: Could not send a sealing message {}.", err),
}
}
}
fn nonce_proposer(&self, proposer_nonce: usize) -> &Address {
let ref p = self.our_params;
p.authorities.get(proposer_nonce % p.authority_n).unwrap()