Merge branch 'master' of github.com:ethcore/parity
This commit is contained in:
commit
6b6b9c72e2
@ -1 +1,8 @@
|
|||||||
# ethcore
|
# ethcore
|
||||||
|
|
||||||
|
[![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url]
|
||||||
|
|
||||||
|
[travis-image]: https://travis-ci.com/ethcore/parity.svg?token=DMFvZu71iaTbUYx9UypX&branch=master
|
||||||
|
[travis-url]: https://travis-ci.com/ethcore/parity
|
||||||
|
[coveralls-image]: https://coveralls.io/repos/github/ethcore/parity/badge.svg?branch=master&t=Fk0OuQ
|
||||||
|
[coveralls-url]: https://coveralls.io/r/ethcore/parity?branch=master
|
||||||
|
@ -59,6 +59,7 @@ impl Stream for RlpStream {
|
|||||||
// we may finish, if the appended list len is equal 0
|
// we may finish, if the appended list len is equal 0
|
||||||
self.encoder.bytes.push(0xc0u8);
|
self.encoder.bytes.push(0xc0u8);
|
||||||
self.note_appended(1);
|
self.note_appended(1);
|
||||||
|
self.finished_list = true;
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
let position = self.encoder.bytes.len();
|
let position = self.encoder.bytes.len();
|
||||||
|
@ -405,3 +405,11 @@ fn test_rlp_2bytes_data_length_check()
|
|||||||
assert_eq!(Err(DecoderError::RlpInconsistentLengthAndData), as_val);
|
assert_eq!(Err(DecoderError::RlpInconsistentLengthAndData), as_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_rlp_nested_empty_list_encode() {
|
||||||
|
let mut stream = RlpStream::new_list(2);
|
||||||
|
stream.append(&(Vec::new() as Vec<u32>));
|
||||||
|
stream.append(&40u32);
|
||||||
|
assert_eq!(stream.drain()[..], [0xc2u8, 0xc0u8, 40u8][..]);
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user