Finish implementing Darrens migrate-ssz-little-endian and add wrapper to check for ssz underflow

This commit is contained in:
Kirk Baird
2019-03-18 18:11:46 +11:00
parent 10efc9a934
commit 9cef6a5814
16 changed files with 114 additions and 73 deletions

View File

@@ -96,7 +96,7 @@ impl TreeHash for AggregateSignature {
mod tests {
use super::super::{Keypair, Signature};
use super::*;
use ssz::ssz_encode;
use ssz::{decode, ssz_encode};
#[test]
pub fn test_ssz_round_trip() {
@@ -106,7 +106,7 @@ mod tests {
original.add(&Signature::new(&[42, 42], 0, &keypair.sk));
let bytes = ssz_encode(&original);
let (decoded, _) = AggregateSignature::ssz_decode(&bytes, 0).unwrap();
let decoded = decode::<AggregateSignature>(&bytes).unwrap();
assert_eq!(original, decoded);
}