Fix test added for serde transaction roundtrip

This commit is contained in:
Andrew Poelstra 2016-02-18 18:02:04 +00:00
parent 92c3b2459c
commit 5f308887c9
2 changed files with 2 additions and 2 deletions

View File

@ -232,8 +232,6 @@ mod tests {
let tx: Transaction = deserialize(&hex_tx).unwrap(); let tx: Transaction = deserialize(&hex_tx).unwrap();
let encoded = strason::from_serialize(&tx).unwrap(); let encoded = strason::from_serialize(&tx).unwrap();
assert_eq!(encoded.to_bytes(),
"\"56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d\"".as_bytes());
let decoded = encoded.into_deserialize().unwrap(); let decoded = encoded.into_deserialize().unwrap();
assert_eq!(tx, decoded); assert_eq!(tx, decoded);
} }

View File

@ -378,6 +378,8 @@ mod tests {
fn test_hash_encode_decode() { fn test_hash_encode_decode() {
let hash = Sha256dHash::from_data(&[]); let hash = Sha256dHash::from_data(&[]);
let encoded = strason::from_serialize(&hash).unwrap(); let encoded = strason::from_serialize(&hash).unwrap();
assert_eq!(encoded.to_bytes(),
"\"56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d\"".as_bytes());
let decoded = encoded.into_deserialize().unwrap(); let decoded = encoded.into_deserialize().unwrap();
assert_eq!(hash, decoded); assert_eq!(hash, decoded);
} }