use crate::{
effects::{SignedTransactionEffects, TransactionEvents},
transaction::{CertifiedTransaction, SignedTransaction, Transaction},
};
#[derive(Clone, Debug)]
pub enum PlainTransactionInfoResponse {
Signed(SignedTransaction),
ExecutedWithCert(
CertifiedTransaction,
SignedTransactionEffects,
TransactionEvents,
),
ExecutedWithoutCert(Transaction, SignedTransactionEffects, TransactionEvents),
}
impl PlainTransactionInfoResponse {
pub fn is_executed(&self) -> bool {
match self {
PlainTransactionInfoResponse::Signed(_) => false,
PlainTransactionInfoResponse::ExecutedWithCert(_, _, _)
| PlainTransactionInfoResponse::ExecutedWithoutCert(_, _, _) => true,
}
}
}