enable TestNet with custom spec

This commit is contained in:
keorn
2016-09-09 11:49:03 +02:00
parent fc3d01ec71
commit 965dde8223
2 changed files with 24 additions and 0 deletions

View File

@@ -102,6 +102,11 @@ impl TestBlockChainClient {
/// Creates new test client.
pub fn new() -> Self {
let spec = Spec::new_test();
TestBlockChainClient::new_with_spec(spec)
}
/// Create test client with custom spec.
pub fn new_with_spec(spec: Spec) -> Self {
let mut client = TestBlockChainClient {
blocks: RwLock::new(HashMap::new()),
numbers: RwLock::new(HashMap::new()),