add Debug to transaction builder-reported types

This commit is contained in:
zancas 2023-09-29 12:55:06 -06:00
parent 30c58ebfb2
commit b5e24751d6
No known key found for this signature in database
GPG Key ID: E4BCAA0A9B09F559
3 changed files with 4 additions and 2 deletions

View File

@ -219,6 +219,7 @@ pub(crate) mod tests {
transparent::{fees as transparent, OutPoint, TxOut},
};
#[derive(Debug)]
pub(crate) struct TestTransparentInput {
pub outpoint: OutPoint,
pub coin: TxOut,

View File

@ -43,6 +43,7 @@ impl fmt::Display for Error {
/// An uninhabited type that allows the type of [`TransparentBuilder::inputs`]
/// to resolve when the transparent-inputs feature is not turned on.
#[cfg(not(feature = "transparent-inputs"))]
#[derive(Debug)]
enum InvalidTransparentInput {}
#[cfg(not(feature = "transparent-inputs"))]

View File

@ -9,7 +9,7 @@ use crate::{
/// This trait provides a minimized view of a transparent input suitable for use in
/// fee and change computation.
pub trait InputView {
pub trait InputView: std::fmt::Debug {
/// The outpoint to which the input refers.
fn outpoint(&self) -> &OutPoint;
/// The previous output being spent.
@ -18,7 +18,7 @@ pub trait InputView {
/// This trait provides a minimized view of a transparent output suitable for use in
/// fee and change computation.
pub trait OutputView {
pub trait OutputView: std::fmt::Debug {
/// Returns the value of the output being created.
fn value(&self) -> Amount;
/// Returns the script corresponding to the newly created output.