rlp deserialization refactor, 30% faster (#4901)
* 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 * moved rlp benches and rlp tests * rlp deserialization refactor, 30% faster * removed redundant comment, print * fixed compiling parity with new rlp deserialization * removed redundant double-space * fixed failing test * updated rlp docs, removed unused traits * fixed rlp benchmarks * replace usage of WriteBytesExt with ByteOrder * removed unused, commented out code * fixed merge conflict
This commit is contained in:
@@ -21,7 +21,7 @@ use std::time::{Instant, Duration};
|
||||
use std::sync::{Arc, Weak};
|
||||
|
||||
use futures::{self, future, BoxFuture, Future};
|
||||
use rlp::{self, UntrustedRlp, View};
|
||||
use rlp::{self, UntrustedRlp};
|
||||
use time::get_time;
|
||||
use util::{H160, H256, Address, U256, H64};
|
||||
use util::sha3::Hashable;
|
||||
|
||||
@@ -36,7 +36,7 @@ use ethcore::executed::{Executed, ExecutionError};
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::transaction::{Action, SignedTransaction, Transaction as EthTransaction};
|
||||
use ethsync::LightSync;
|
||||
use rlp::{UntrustedRlp, View};
|
||||
use rlp::UntrustedRlp;
|
||||
use util::sha3::{SHA3_NULL_RLP, SHA3_EMPTY_LIST_RLP};
|
||||
use util::{RwLock, Mutex, Uint, U256};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::sync::{Arc, Weak};
|
||||
|
||||
use rlp::{UntrustedRlp, View};
|
||||
use rlp::UntrustedRlp;
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::transaction::{SignedTransaction, PendingTransaction};
|
||||
use futures::{future, BoxFuture, Future, IntoFuture};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::sync::{Weak, Arc};
|
||||
|
||||
use rlp::{UntrustedRlp, View};
|
||||
use rlp::UntrustedRlp;
|
||||
use ethcore::client::{MiningBlockChainClient, CallAnalytics, TransactionId, TraceId};
|
||||
use ethcore::miner::MinerService;
|
||||
use ethcore::transaction::SignedTransaction;
|
||||
|
||||
@@ -940,7 +940,7 @@ fn rpc_eth_send_raw_transaction_error() {
|
||||
],
|
||||
"id": 1
|
||||
}"#;
|
||||
let res = r#"{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid RLP.","data":"RlpIncorrectListLen"},"id":1}"#.into();
|
||||
let res = r#"{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid RLP.","data":"RlpExpectedToBeList"},"id":1}"#.into();
|
||||
|
||||
assert_eq!(tester.io.handle_request_sync(&req), Some(res));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user