Pipe all Claim constructors through a function

This commit is contained in:
Greg Fitzgerald
2018-03-02 10:58:43 -07:00
parent 8fe464cfa3
commit a0410c4677
5 changed files with 20 additions and 35 deletions

View File

@@ -49,7 +49,7 @@ impl Accountant {
}
pub fn deposit_signed(self: &mut Self, to: PublicKey, data: u64, sig: Signature) -> Result<()> {
let event = Event::Claim { to, data, sig };
let event = Event::new_claim(to, data, sig);
if !self.historian.verify_event(&event) {
return Err(AccountingError::InvalidEvent);
}