pub struct NewPotentialInputAmount {
pub count: usize,
pub item: TxIn,
pub signer: bool,
}Expand description
Represents potential transaction inputs for size estimation.
This struct is used in “what-if” scenarios where you need to estimate the size of a transaction before actually adding inputs. It’s particularly useful for fee calculation and UTXO consolidation planning.
§Fields
count: Number of inputs of this type to additem: Template input to use for size calculationsigner: Whether these inputs will be signed by a program account
§Examples
// Estimate adding 3 similar inputs
let potential_inputs = NewPotentialInputAmount {
count: 3,
item: TxIn {
previous_output: OutPoint::null(),
script_sig: ScriptBuf::new(),
sequence: Sequence::MAX,
witness: Witness::new(),
},
signer: true,
};Fields§
§count: usize§item: TxIn§signer: boolAuto Trait Implementations§
impl Freeze for NewPotentialInputAmount
impl RefUnwindSafe for NewPotentialInputAmount
impl Send for NewPotentialInputAmount
impl Sync for NewPotentialInputAmount
impl Unpin for NewPotentialInputAmount
impl UnsafeUnpin for NewPotentialInputAmount
impl UnwindSafe for NewPotentialInputAmount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more