Fixed depth tracking
This commit is contained in:
parent
aa9fb98a74
commit
698fa11e76
@ -42,9 +42,11 @@ impl Stream for RlpStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn append<'a, E>(&'a mut self, value: &E) -> &'a mut Self where E: Encodable {
|
fn append<'a, E>(&'a mut self, value: &E) -> &'a mut Self where E: Encodable {
|
||||||
|
let depth = self.unfinished_lists.len();
|
||||||
value.rlp_append(self);
|
value.rlp_append(self);
|
||||||
// if list is finished, prepend the length
|
if depth == self.unfinished_lists.len() {
|
||||||
self.note_appended(1);
|
self.note_appended(1);
|
||||||
|
}
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user