From 1eacd8a8b2229bd7cebb65476f6d254bcd69fa5b Mon Sep 17 00:00:00 2001 From: spacebear Date: Thu, 7 Nov 2024 15:59:31 -0500 Subject: [PATCH] Silence dead code warnings on InternalRequestError The internal fields may be useful for debugging but shouldn't be displayed in error responses for privacy. --- payjoin/src/receive/error.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/payjoin/src/receive/error.rs b/payjoin/src/receive/error.rs index 88b6e90f..4783bbdb 100644 --- a/payjoin/src/receive/error.rs +++ b/payjoin/src/receive/error.rs @@ -70,10 +70,12 @@ pub(crate) enum InternalRequestError { MissingPayment, /// The original PSBT transaction fails the broadcast check OriginalPsbtNotBroadcastable, + #[allow(dead_code)] /// The sender is trying to spend the receiver input InputOwned(bitcoin::ScriptBuf), /// The expected input weight cannot be determined InputWeight(crate::psbt::InputWeightError), + #[allow(dead_code)] /// Original PSBT input has been seen before. Only automatic receivers, aka "interactive" in the spec /// look out for these to prevent probing attacks. InputSeen(bitcoin::OutPoint),