From f2a35cc3bd9a1c5cbd7abd3523089b06d26ecd38 Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Tue, 28 Feb 2023 17:37:20 +0000 Subject: [PATCH] log pubkey of beaconer when beacon fails to cast --- iot_verifier/src/poc.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/iot_verifier/src/poc.rs b/iot_verifier/src/poc.rs index a21d66db4..6cdecb539 100644 --- a/iot_verifier/src/poc.rs +++ b/iot_verifier/src/poc.rs @@ -423,7 +423,11 @@ fn verify_beacon_payload( &beacon_report.remote_entropy, ) .map_err(|e| { - tracing::warn!("failed to cast report to beacon, reason: {:?}", e); + tracing::warn!( + "failed to cast report to beacon, reason: {:?}, pub_key: {:?}", + e, + beacon_report.pub_key + ); InvalidReason::InvalidPacket })?; tracing::debug!("generated beacon {:?}", generated_beacon); @@ -433,7 +437,11 @@ fn verify_beacon_payload( match beacon_report.to_beacon(entropy_start, entropy_version) { Ok(res) => res, Err(e) => { - tracing::warn!("failed to cast report to beacon, reason: {:?}", e); + tracing::warn!( + "failed to cast report to beacon, reason: {:?}, pub_key: {:?}", + e, + beacon_report.pub_key + ); return Err(InvalidReason::InvalidPacket); } };