Skip to content

Commit

Permalink
fix: mempool panic (#5814)
Browse files Browse the repository at this point in the history
Description
---
Fixes potential panic in debug message
  • Loading branch information
SWvheerden authored Sep 29, 2023
1 parent 36d72e8 commit 754fb16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion base_layer/core/src/mempool/service/inbound_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@ impl MempoolInboundHandlers {
self.mempool.has_tx_with_excess_sig(excess_sig).await?,
)),
SubmitTransaction(tx) => {
let first_tx_kernel_excess_sig = tx
.first_kernel_excess_sig()
.ok_or(MempoolServiceError::TransactionNoKernels)?
.get_signature()
.to_hex();
debug!(
target: LOG_TARGET,
"Transaction ({}) submitted using request.",
tx.body.kernels()[0].excess_sig.get_signature().to_hex(),
first_tx_kernel_excess_sig,
);
Ok(MempoolResponse::TxStorage(self.submit_transaction(tx, None).await?))
},
Expand Down

0 comments on commit 754fb16

Please sign in to comment.