pub struct TxIn {
pub previous_output: OutPoint,
pub script_sig: ScriptBuf,
pub sequence: Sequence,
pub witness: Witness,
}
alloc
only.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 as an input.
script_sig: ScriptBuf
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 behavior 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§
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for TxIn
Available on crate feature arbitrary
only.
impl<'a> Arbitrary<'a> for TxIn
arbitrary
only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read more