Fix master failing test (#915)

* Use a valid secret key in ssz test

* Correct test_random secret key tests
This commit is contained in:
Age Manning
2020-03-17 11:07:52 +11:00
committed by GitHub
parent b1d23ec294
commit 756b110854
2 changed files with 8 additions and 14 deletions

View File

@@ -79,8 +79,12 @@ mod tests {
#[test]
pub fn test_ssz_round_trip() {
let original =
SecretKey::from_bytes(b"jzjxxgjajfjrmgodszzsgqccmhnyvetcuxobhtynojtpdtbj").unwrap();
let byte_key = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 211, 210, 129, 231, 69, 162, 234,
16, 15, 244, 214, 126, 201, 0, 85, 28, 239, 82, 121, 208, 190, 223, 6, 169, 202, 86,
236, 197, 218, 3, 69,
];
let original = SecretKey::from_bytes(&byte_key).unwrap();
let bytes = ssz_encode(&original);
let decoded = SecretKey::from_ssz_bytes(&bytes).unwrap();