diff --git a/ethcore/src/receipt.rs b/ethcore/src/receipt.rs index d320373d6..b3379c148 100644 --- a/ethcore/src/receipt.rs +++ b/ethcore/src/receipt.rs @@ -36,3 +36,18 @@ impl Encodable for Receipt { s.append(&self.logs); } } + +#[test] +fn test_basic() { + let expected = FromHex::from_hex("f90162a02f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee83040caeb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000f838f794dcf421d093428b096ca501a7cd1a740855a7976fc0a00000000000000000000000000000000000000000000000000000000000000000").unwrap(); + let r = Receipt::new( + x!("2f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee"), + x!(0x40cae), + vec![LogEntry::new( + x!("dcf421d093428b096ca501a7cd1a740855a7976f"), + vec![], + vec![0u8; 32] + )] + ); + assert_eq!(&encode(&r)[..], &expected[..]); +} \ No newline at end of file