You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// 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.
The text was updated successfully, but these errors were encountered:
Code Base:
branch:master
commit:0a4ca2145a0c95b5bafa84c2f095c644907a8825
file:lib.rs
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 thecommitBlocks
transaction is accepted.It will send the followingproveBlocks
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.
The text was updated successfully, but these errors were encountered: