From 3def0b9609ccf511895fc22149bb49c978b6c740 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 27 Nov 2015 13:17:28 +0100 Subject: [PATCH] Add uint constants. --- src/lib.rs | 2 ++ src/uint.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 44ffc106f..e15f33c56 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,6 +15,8 @@ pub mod vector; //pub mod network; +pub type Bytes = Vec; + #[test] fn it_works() { } diff --git a/src/uint.rs b/src/uint.rs index bc333631b..c8e9d84de 100644 --- a/src/uint.rs +++ b/src/uint.rs @@ -461,6 +461,10 @@ impl From for U256 { } } +pub const ZERO_U256: U256 = U256([0x00u64; 4]); +pub const ONE_U256: U256 = U256([0x01u64, 0x00u64, 0x00u64, 0x00u64]); +pub const BAD_U256: U256 = U256([0xffffffffffffffffu64; 4]); + #[cfg(test)] mod tests { use uint::U256;