From 84cd4ca96437263ff39be1142b1cdc5d8f96e534 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 10 Feb 2023 11:58:25 +1100 Subject: [PATCH] Deprecate script::read_uint There is no current usage for reading an unsigned script integer, seems like this is kruft from days gone past. --- bitcoin/src/blockdata/script/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/bitcoin/src/blockdata/script/mod.rs b/bitcoin/src/blockdata/script/mod.rs index 199dfb58..5c17c6ee 100644 --- a/bitcoin/src/blockdata/script/mod.rs +++ b/bitcoin/src/blockdata/script/mod.rs @@ -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::()` /// 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 { read_uint_iter(&mut data.iter(), size).map_err(Into::into) }