Derive PartialEq for TransactionStatus, InvalidTransaction
It is helpful to say execution_result.status !=
TransactionStatus::Valid.
@@ -78,7 +78,7 @@ impl TransactionFamily {
}
/// An `InvalidTransaction` has information about why the transaction failed.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, PartialEq)]
pub struct InvalidTransaction {
/// human readable reason for why the transaction was invalid.
pub error_message: String,
@@ -91,7 +91,7 @@ pub struct InvalidTransaction {
///
/// A `TransactionStatus` covers the possible outcomes that can occur during a
/// transaction's execution.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, PartialEq)]
pub enum TransactionStatus {
Invalid(InvalidTransaction),
Valid,
