Struct TxIn
pub struct TxIn {
pub previous_output: OutPoint,
pub script_sig: Script,
pub sequence: Sequence,
pub witness: Witness,
}
Expand description
Bitcoin transaction input.
It contains the location of the previous transaction’s output, that it spends and set of scripts that satisfy its spending conditions.
§Bitcoin Core References
Fields§
§previous_output: OutPoint
The reference to the previous output that is being used an an input.
script_sig: Script
The script which pushes values on the stack which will cause the referenced output’s script to be accepted.
sequence: Sequence
The sequence number, which suggests to miners which of two conflicting transactions should be preferred, or 0xFFFFFFFF to ignore this feature. This is generally never used since the miner behaviour cannot be enforced.
witness: Witness
Witness data: an array of byte-arrays. Note that this field is not (de)serialized with the rest of the TxIn in Encodable/Decodable, as it is (de)serialized at the end of the full Transaction. It is (de)serialized with the rest of the TxIn in other (de)serialization routines.
Implementations§
§impl TxIn
impl TxIn
pub fn enables_lock_time(&self) -> bool
pub fn enables_lock_time(&self) -> bool
Returns true if this input enables the LockTime
(aka nLockTime
) of its Transaction
.
nLockTime
is enabled if any input enables it. See Transaction::is_lock_time_enabled
to check the overall state. If none of the inputs enables it, the lock time value is simply
ignored. If this returns false and OP_CHECKLOCKTIMEVERIFY is used in the redeem script with
this input then the script execution will fail [BIP-0065].
Trait Implementations§
§impl Ord for TxIn
impl Ord for TxIn
§impl PartialOrd for TxIn
impl PartialOrd for TxIn
impl Eq for TxIn
impl StructuralPartialEq for TxIn
Auto Trait Implementations§
impl Freeze for TxIn
impl RefUnwindSafe for TxIn
impl Send for TxIn
impl Sync for TxIn
impl Unpin for TxIn
impl UnwindSafe for TxIn
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request