Add logging to DA and transaction utilities

This commit is contained in:
andrussal 2025-12-11 08:13:23 +01:00
parent 74fddd51dd
commit b9ceca4182
4 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,7 @@ pub fn create_inscription_transaction_with_id(id: ChannelId) -> SignedMantleTx {
let tx_hash = mantle_tx.hash();
let signature = signing_key.sign(&tx_hash.as_signing_bytes());
tracing::debug!(channel = ?id, tx_hash = ?tx_hash, "building inscription transaction");
SignedMantleTx::new(
mantle_tx,

View File

@ -185,11 +185,13 @@ fn capture_block(
if !new_inscriptions.is_empty() {
let mut guard = inscriptions.lock().expect("inscription lock poisoned");
guard.extend(new_inscriptions);
tracing::debug!(count = guard.len(), "DA expectation captured inscriptions");
}
if !new_blobs.is_empty() {
let mut guard = blobs.lock().expect("blob lock poisoned");
guard.extend(new_blobs);
tracing::debug!(count = guard.len(), "DA expectation captured blobs");
}
}

View File

@ -143,6 +143,7 @@ where
match receiver.recv().await {
Ok(record) => {
if let Some(msg_id) = find_channel_op(record.block.as_ref(), &mut matcher) {
tracing::debug!(?msg_id, "DA: matched channel operation");
return Ok(msg_id);
}
}
@ -166,6 +167,7 @@ async fn publish_blob(
let signer = SigningKey::from_bytes(&TEST_KEY_BYTES).verifying_key();
let data = random_blob_payload();
tracing::debug!(channel = ?channel_id, payload_bytes = data.len(), "DA: prepared blob payload");
let client = ExecutorHttpClient::new(None);
let mut candidates: Vec<&ApiClient> = executors.iter().collect();

View File

@ -198,6 +198,11 @@ impl<'a> Submission<'a> {
async fn submit_wallet_transaction(ctx: &RunContext, input: &WalletInput) -> Result<(), DynError> {
let signed_tx = Arc::new(build_wallet_transaction(input)?);
tracing::debug!(
tx_hash = ?signed_tx.hash(),
user = ?input.account.public_key(),
"submitting wallet transaction"
);
submit_transaction_via_cluster(ctx, signed_tx).await
}