-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Code Base:
branch:master
commit:0a4ca2145a0c95b5bafa84c2f095c644907a8825
file:lib.rs
/// Stores the new operation in the database and sends the corresponding transaction.
async fn initialize_operation(&mut self, tx: TxData, current_block: u64) -> anyhow::Result<()> {
....
if let Err(e) = self.ethereum.send_raw_tx(signed_tx.raw_tx).await {
// Sending tx error is not critical: this will result in transaction being considered stuck,
// and resent. We can't do anything about this failure either, since it's most probably is not
// related to the node logic, so we just log this error and pretend to have this operation
// processed.
vlog::warn!("Error while sending the operation: {}", e);
}
transaction.commit().await?;
Ok(())
}
As the function initialize_operation showed above,the eth sender will ignore the error and just logged warning and commit the status into database.
But it will save the wrong status into database if it send some transactions likes nonce too low.The eth sender will consider the commitBlocks transaction is accepted.It will send the following proveBlocks transaction which will cause the contract reverted and the program crashed.
So the better way to handle this case is processing the failure according to the receipt details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels