Skip to content

Commit

Permalink
feat: remove DeserializationError from TransactionProverErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoPittella committed Sep 26, 2024
1 parent 8ed4820 commit 1cbb27d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions bin/tx-prover/src/server/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use generated::api::{api_server, ProveTransactionRequest, ProveTransactionResponse};
use miden_objects::transaction::{ProvenTransaction, TransactionWitness};
use miden_prover::DeserializationError;
use miden_tx::{
utils::{Deserializable, Serializable},
LocalTransactionProver, TransactionProver, TransactionProverError,
LocalTransactionProver, TransactionProver,
};
use tokio::{net::TcpListener, sync::Mutex};
use tonic::{Request, Response, Status};
Expand Down Expand Up @@ -66,11 +67,10 @@ impl From<ProvenTransaction> for ProveTransactionResponse {
}

impl TryFrom<ProveTransactionResponse> for ProvenTransaction {
type Error = TransactionProverError;
type Error = DeserializationError;

fn try_from(response: ProveTransactionResponse) -> Result<Self, Self::Error> {
ProvenTransaction::read_from_bytes(&response.proven_transaction)
.map_err(|err| TransactionProverError::DeserializationError(err.to_string()))
}
}

Expand Down
4 changes: 0 additions & 4 deletions miden-tx/src/errors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ pub enum TransactionProverError {
InvalidTransactionOutput(TransactionOutputError),
ProvenTransactionError(ProvenTransactionError),
TransactionHostCreationFailed(TransactionHostError),
DeserializationError(String),
}

impl Display for TransactionProverError {
Expand All @@ -69,9 +68,6 @@ impl Display for TransactionProverError {
TransactionProverError::TransactionHostCreationFailed(inner) => {
write!(f, "Failed to create the transaction host: {}", inner)
},
TransactionProverError::DeserializationError(inner) => {
write!(f, "Deserialization error: {}", inner)
},
}
}
}
Expand Down

0 comments on commit 1cbb27d

Please sign in to comment.