Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/rpc/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,12 @@ impl api_server::Api for RpcService {
))
})?;

// If transaction inputs are provided, re-execute the transaction to validate it.
// Transaction inputs must be provided in order to allow for transaction re-execution via
// the Validator.
if request.transaction_inputs.is_some() {
// Re-execute the transaction via the Validator.
self.validator.clone().submit_proven_transaction(request.clone()).await?;
} else {
return Err(Status::invalid_argument("Transaction inputs must be provided"));
Comment on lines +419 to +420
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi this can be written as

let request = request.transaction_inputs.ok_or(Err(...))?;

}

block_producer.clone().submit_proven_transaction(request).await
Expand Down
Loading