Skip to content

Commit 97e6fe1

Browse files
authored
chore: print to logs receipt error (#294)
1 parent d557d3c commit 97e6fe1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tap-agent/src/agent/sender_allocation.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use tap_core::{
2727
signed_message::EIP712SignedMessage,
2828
};
2929
use thegraph_core::Address;
30-
use tracing::{error, warn};
30+
use tracing::{debug, error, warn};
3131

3232
use crate::{agent::sender_account::ReceiptFees, lazy_static};
3333

@@ -680,14 +680,19 @@ impl SenderAllocationState {
680680
let receipt = received_receipt.signed_receipt();
681681
let allocation_id = receipt.message.allocation_id;
682682
let encoded_signature = receipt.signature.as_bytes().to_vec();
683-
683+
let receipt_error = received_receipt.clone().error().to_string();
684684
let receipt_signer = receipt
685685
.recover_signer(&self.domain_separator)
686686
.map_err(|e| {
687687
error!("Failed to recover receipt signer: {}", e);
688688
anyhow!(e)
689689
})?;
690-
690+
debug!(
691+
"Receipt for allocation {} and signer {} failed reason: {}",
692+
allocation_id.encode_hex(),
693+
receipt_signer.encode_hex(),
694+
receipt_error
695+
);
691696
sqlx::query!(
692697
r#"
693698
INSERT INTO scalar_tap_receipts_invalid (

0 commit comments

Comments
 (0)