Move verify into methods

A little overly-coupled to Serialize, but makes the code a lot tighter
This commit is contained in:
Greg Fitzgerald
2018-03-06 12:26:39 -07:00
parent 4fcd9e3bd6
commit b019416518
7 changed files with 30 additions and 32 deletions

View File

@ -5,7 +5,6 @@
use std::net::UdpSocket;
use std::io;
use bincode::{deserialize, serialize};
use event::get_signature;
use transaction::{get_pubkey, sign_transaction_data, PublicKey, Signature, Transaction};
use log::{Entry, Sha256Hash};
use ring::signature::Ed25519KeyPair;
@ -109,7 +108,7 @@ impl AccountantStub {
if let Response::Entries { entries } = resp {
for Entry { id, event, .. } in entries {
self.last_id = Some(id);
if let Some(sig) = get_signature(&event) {
if let Some(sig) = event.get_signature() {
if sig == *wait_sig {
return Ok(());
}