|
1 | 1 | use core::fmt::{Debug, Display}; |
2 | | -use std::vec::Vec; |
| 2 | +use std::{boxed::Box, vec::Vec}; |
3 | 3 |
|
4 | 4 | use bdk_coin_select::FeeRate; |
5 | 5 | use bitcoin::{absolute, transaction, Sequence}; |
@@ -67,9 +67,9 @@ pub enum CreatePsbtError { |
67 | 67 | /// Attempted to mix locktime types. |
68 | 68 | LockTypeMismatch, |
69 | 69 | /// Missing tx for legacy input. |
70 | | - MissingFullTxForLegacyInput(Input), |
| 70 | + MissingFullTxForLegacyInput(Box<Input>), |
71 | 71 | /// Missing tx for segwit v0 input. |
72 | | - MissingFullTxForSegwitV0Input(Input), |
| 72 | + MissingFullTxForSegwitV0Input(Box<Input>), |
73 | 73 | /// Psbt error. |
74 | 74 | Psbt(bitcoin::psbt::Error), |
75 | 75 | /// Update psbt output with descriptor error. |
@@ -197,14 +197,14 @@ impl Selection { |
197 | 197 | if psbt_input.non_witness_utxo.is_none() { |
198 | 198 | if witness_version.is_none() { |
199 | 199 | return Err(CreatePsbtError::MissingFullTxForLegacyInput( |
200 | | - plan_input.clone(), |
| 200 | + Box::new(plan_input.clone()), |
201 | 201 | )); |
202 | 202 | } |
203 | 203 | if params.mandate_full_tx_for_segwit_v0 |
204 | 204 | && witness_version == Some(bitcoin::WitnessVersion::V0) |
205 | 205 | { |
206 | 206 | return Err(CreatePsbtError::MissingFullTxForSegwitV0Input( |
207 | | - plan_input.clone(), |
| 207 | + Box::new(plan_input.clone()), |
208 | 208 | )); |
209 | 209 | } |
210 | 210 | } |
|
0 commit comments