Skip to content

Commit

Permalink
fix(sumeragi): remove expired transaction from cache (#4922)
Browse files Browse the repository at this point in the history
Signed-off-by: Shanin Roman <[email protected]>
  • Loading branch information
Erigara authored and mversic committed Aug 30, 2024
1 parent f05d088 commit 5decae1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/src/gossiper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ impl TransactionGossiper {
tx,
err: crate::queue::Error::InBlockchain,
}) => {
iroha_logger::debug!(tx_payload_hash = %tx.as_ref().hash(), "Transaction already in blockchain, ignoring...")
iroha_logger::debug!(tx = %tx.as_ref().hash(), "Transaction already in blockchain, ignoring...")
}
Err(crate::queue::Failure {
tx,
err: crate::queue::Error::IsInQueue,
}) => {
iroha_logger::trace!(tx_payload_hash = %tx.as_ref().hash(), "Transaction already in the queue, ignoring...")
iroha_logger::trace!(tx = %tx.as_ref().hash(), "Transaction already in the queue, ignoring...")
}
Err(crate::queue::Failure { tx, err }) => {
iroha_logger::error!(?err, tx_payload_hash = %tx.as_ref().hash(), "Failed to enqueue transaction.")
iroha_logger::error!(?err, tx = %tx.as_ref().hash(), "Failed to enqueue transaction.")
}
},
Err(err) => iroha_logger::error!(%err, "Transaction rejected"),
Expand Down
2 changes: 1 addition & 1 deletion core/src/sumeragi/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ pub(crate) fn run(
if expired {
debug!(tx=%tx.as_ref().hash(), "Transaction expired")
}
expired
!expired
});

sumeragi.queue.get_transactions_for_block(
Expand Down
2 changes: 1 addition & 1 deletion core/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl StateBlock<'_> {
));
}

debug!("Validating transaction: {:?}", tx);
debug!(tx=%tx.as_ref().hash(), "Validating transaction");
Self::validate_with_runtime_executor(tx.clone(), state_transaction)?;

if let (authority, Executable::Wasm(bytes)) = tx.into() {
Expand Down

0 comments on commit 5decae1

Please sign in to comment.