Deprecate script::read_uint

There is no current usage for reading an unsigned script integer, seems
like this is kruft from days gone past.
This commit is contained in:
Tobin C. Harding 2023-02-10 11:58:25 +11:00
parent 2290e90b71
commit 84cd4ca964
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 0 deletions

View File

@ -167,6 +167,7 @@ pub fn read_scriptbool(v: &[u8]) -> bool {
/// Note that this does **not** return an error for `size` between `core::size_of::<usize>()`
/// and `u16::max_value / 8` if there's no overflow.
#[inline]
#[deprecated(since = "0.30.0", note = "bitcoin integers are signed 32 bits, use read_scriptint")]
pub fn read_uint(data: &[u8], size: usize) -> Result<usize, Error> {
read_uint_iter(&mut data.iter(), size).map_err(Into::into)
}