Use standard paths for Ethash cache (#5881)
* Use cache path to store ethash files. * Fixing tests, more flexible API. * Use AsRef<Path> everywhere. * Fixing ethcore tests. * Fix RPC tests.
This commit is contained in:
committed by
Arkadiy Paronyan
parent
125aa0aeb4
commit
a24b6ad983
@@ -15,6 +15,7 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! rpc integration tests.
|
||||
use std::env;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -318,7 +319,7 @@ const POSITIVE_NONCE_SPEC: &'static [u8] = br#"{
|
||||
#[test]
|
||||
fn eth_transaction_count() {
|
||||
let secret = "8a283037bb19c4fed7b1c569e40c7dcff366165eb869110a1b11532963eb9cb2".parse().unwrap();
|
||||
let tester = EthTester::from_spec(Spec::load(TRANSACTION_COUNT_SPEC).expect("invalid chain spec"));
|
||||
let tester = EthTester::from_spec(Spec::load(&env::temp_dir(), TRANSACTION_COUNT_SPEC).expect("invalid chain spec"));
|
||||
let address = tester.accounts.insert_account(secret, "").unwrap();
|
||||
tester.accounts.unlock_account_permanently(address, "".into()).unwrap();
|
||||
|
||||
@@ -444,7 +445,7 @@ fn verify_transaction_counts(name: String, chain: BlockChain) {
|
||||
|
||||
#[test]
|
||||
fn starting_nonce_test() {
|
||||
let tester = EthTester::from_spec(Spec::load(POSITIVE_NONCE_SPEC).expect("invalid chain spec"));
|
||||
let tester = EthTester::from_spec(Spec::load(&env::temp_dir(), POSITIVE_NONCE_SPEC).expect("invalid chain spec"));
|
||||
let address = Address::from(10);
|
||||
|
||||
let sample = tester.handler.handle_request_sync(&(r#"
|
||||
|
||||
Reference in New Issue
Block a user