Reduce unnecessary allocations (#5944)

This commit is contained in:
Jef
2017-06-28 09:36:42 +02:00
committed by Arkadiy Paronyan
parent 944f9d7fb5
commit 72094a8bee
5 changed files with 6 additions and 6 deletions

View File

@@ -493,8 +493,8 @@ impl Engine for Tendermint {
let seal_length = header.seal().len();
if seal_length == self.seal_fields() {
// Either proposal or commit.
if (header.seal()[1] == ::rlp::NULL_RLP.to_vec())
!= (header.seal()[2] == ::rlp::EMPTY_LIST_RLP.to_vec()) {
if (header.seal()[1] == ::rlp::NULL_RLP)
!= (header.seal()[2] == ::rlp::EMPTY_LIST_RLP) {
Ok(())
} else {
warn!(target: "engine", "verify_block_basic: Block is neither a Commit nor Proposal.");