Add uint constants.

This commit is contained in:
Gav Wood 2015-11-27 13:17:28 +01:00
parent f4927619da
commit 3def0b9609
2 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,8 @@ pub mod vector;
//pub mod network;
pub type Bytes = Vec<u8>;
#[test]
fn it_works() {
}

View File

@ -461,6 +461,10 @@ impl From<U128> 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;