Function bitcoin_internals::script::read_push_data_len

source ยท
pub fn read_push_data_len(
    data: &mut Iter<'_, u8>,
    size: PushDataLenLen,
) -> Result<usize, EarlyEndOfScriptError>
Expand description

Reads a usize from an iterator.

A script push data instruction includes the length of the data being pushed, this function reads that length from an iterator (encoded in either 1, 2, or 4 bytes).