Fixed hash-tail tests.
This commit is contained in:
1 parent
9f7a6a126b
commit
0d40f6599b
1 file changed
+5
-5
+5
-5
@@ -27,7 +27,7 @@ pub struct Keystore {
|
||||
#[serde(skip)]
|
||||
path: String,
|
||||
#[serde(skip)]
|
||||
seed: Vec<u8>
|
||||
seed: Vec<u8>,
|
||||
}
|
||||
|
||||
impl Keystore {
|
||||
@@ -51,10 +51,10 @@ impl Keystore {
|
||||
let mut keystore = Self::from_bytes(key.as_slice());
|
||||
keystore.path = path.to_str().unwrap().to_owned();
|
||||
Some(keystore)
|
||||
},
|
||||
}
|
||||
Err(_) => {
|
||||
None
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
pub fn test_tail_bytes() {
|
||||
let bytes = Bytes::new(vec![0,255,255,255]);
|
||||
assert_eq!(bytes.get_tail_u64(), 16777215);
|
||||
let bytes = Bytes::new(vec![0, 255, 255, 255, 0, 255, 255, 255]);
|
||||
assert_eq!(bytes.get_tail_u64(), 72057589759737855u64);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user