+pub(crate) struct DebugSpendable<'a>(pub &'a SpendableOutputDescriptor);
+impl<'a> std::fmt::Display for DebugSpendable<'a> {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
+ match self.0 {
+ &SpendableOutputDescriptor::StaticOutput { ref outpoint, .. } => {
+ write!(f, "StaticOutput {}:{} marked for spending", outpoint.txid, outpoint.vout)?;
+ }
+ &SpendableOutputDescriptor::DynamicOutputP2WSH { ref outpoint, .. } => {
+ write!(f, "DynamicOutputP2WSH {}:{} marked for spending", outpoint.txid, outpoint.vout)?;
+ }
+ &SpendableOutputDescriptor::DynamicOutputP2WPKH { ref outpoint, .. } => {
+ write!(f, "DynamicOutputP2WPKH {}:{} marked for spending", outpoint.txid, outpoint.vout)?;
+ }
+ }
+ Ok(())
+ }
+}
+
+macro_rules! log_spendable {
+ ($obj: expr) => {
+ ::util::macro_logger::DebugSpendable(&$obj)
+ }
+}
+