fn is_transaction_valid<E>(tx: &Transaction<E>) -> bool