mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-11-03 12:57:03 +00:00
Separate Amount::{from_i64, from_nonnegative_i64} APIs
This is more intuitive than a boolean flag for handling non-negative Amounts stored in i64 values.
This commit is contained in:
@@ -79,7 +79,7 @@ impl TxOut {
|
||||
let value = {
|
||||
let mut tmp = [0; 8];
|
||||
reader.read_exact(&mut tmp)?;
|
||||
Amount::from_i64_le_bytes(tmp, false)
|
||||
Amount::from_nonnegative_i64_le_bytes(tmp)
|
||||
}
|
||||
.map_err(|_| io::Error::new(io::ErrorKind::InvalidData, "value out of range"))?;
|
||||
let script_pubkey = Script::read(&mut reader)?;
|
||||
|
||||
Reference in New Issue
Block a user