rlp serialization refactor (#4873)
* fixed naming of rlp modules * RlpStream cleanup * appending short rlp lists (0...55 bytes) is 25% faster * RlpStream does not use bytes module, nor trait Stream * removed unused code from rlp module * compiling ethcore-util with new rlp serialization * compiling parity with new rlp serialization * fixed compiling ethcore-light with new rlp serialization * fixed compiling ethsync with new rlp serialization * removed redundant comment, print * removed redundant double-space * replace usage of WriteBytesExt with ByteOrder
This commit is contained in:
@@ -64,9 +64,12 @@ impl Into<Generic> for AuthorityRound {
|
||||
|
||||
impl Into<Generic> for Tendermint {
|
||||
fn into(self) -> Generic {
|
||||
let mut s = RlpStream::new_list(3);
|
||||
s.append(&self.round).append(&self.proposal).append(&self.precommits);
|
||||
Generic(s.out())
|
||||
let mut stream = RlpStream::new_list(3);
|
||||
stream
|
||||
.append(&self.round)
|
||||
.append(&self.proposal)
|
||||
.append_list(&self.precommits);
|
||||
Generic(stream.out())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ use super::genesis::Genesis;
|
||||
use super::seal::Generic as GenericSeal;
|
||||
use ethereum;
|
||||
use ethjson;
|
||||
use rlp::{Rlp, RlpStream, View, Stream};
|
||||
use rlp::{Rlp, RlpStream, View};
|
||||
|
||||
/// Parameters common to all engines.
|
||||
#[derive(Debug, PartialEq, Clone, Default)]
|
||||
|
||||
Reference in New Issue
Block a user