Simplify tx.validate() and transaction::aggregate() (#1436)
* simplify tx validation and aggregation we *only* need to account for reward when building a block from txs * rustfmt * cleanup and tests passing * rustfmt * better comments in with_reward() * fix wallet tests
This commit is contained in:
@@ -299,7 +299,7 @@ mod test {
|
||||
&keychain,
|
||||
).unwrap();
|
||||
|
||||
tx.validate(false).unwrap();
|
||||
tx.validate().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -319,7 +319,7 @@ mod test {
|
||||
&keychain,
|
||||
).unwrap();
|
||||
|
||||
tx.validate(false).unwrap();
|
||||
tx.validate().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -333,6 +333,6 @@ mod test {
|
||||
&keychain,
|
||||
).unwrap();
|
||||
|
||||
tx.validate(false).unwrap();
|
||||
tx.validate().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ impl Slate {
|
||||
final_tx.kernels()[0].verify()?;
|
||||
|
||||
// confirm the overall transaction is valid (including the updated kernel)
|
||||
let _ = final_tx.validate(false)?;
|
||||
let _ = final_tx.validate()?;
|
||||
|
||||
self.tx = final_tx;
|
||||
Ok(())
|
||||
|
||||
@@ -196,7 +196,7 @@ where
|
||||
|
||||
// finalize the burn transaction and send
|
||||
let tx_burn = build::transaction(parts, &keychain)?;
|
||||
tx_burn.validate(false)?;
|
||||
tx_burn.validate()?;
|
||||
Ok(tx_burn)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user