Move a bunch of stuff around (#10101)

* Move devtools.

* Merge stop_guard & rename memzero

* Move price-info to miner.

* Group account management

* Clean up workspace members.

* Move local store closer to miner.

* Move clib examples.

* Move registrar and hash-fetch

* Move rpc_cli/rpc_client

* Move stratum closer to miner.

* Fix naming convention of crates.

* Update Cpp examples path.

* Fix paths for clib-example.

* Fix removing build.
This commit is contained in:
Tomasz Drwięga
2018-12-28 10:33:49 +01:00
committed by Wei Tang
parent bf9fedc4ee
commit ff0095ac5e
225 changed files with 111 additions and 181 deletions

View File

@@ -13,7 +13,6 @@ ethcore-sync = { path = "../sync" }
ethereum-types = "0.4"
kvdb = "0.1"
log = "0.4"
stop-guard = { path = "../../util/stop-guard" }
trace-time = "0.1"
[dev-dependencies]

View File

@@ -21,7 +21,6 @@ extern crate ethcore_private_tx;
extern crate ethcore_sync as sync;
extern crate ethereum_types;
extern crate kvdb;
extern crate stop_guard;
#[macro_use]
extern crate error_chain;
@@ -37,6 +36,7 @@ extern crate tempdir;
mod error;
mod service;
mod stop_guard;
#[cfg(test)]
extern crate kvdb_rocksdb;

View File

@@ -0,0 +1,40 @@
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Stop guard mod
use std::sync::Arc;
use std::sync::atomic::*;
/// Stop guard that will set a stop flag on drop
pub struct StopGuard {
flag: Arc<AtomicBool>,
}
impl StopGuard {
/// Create a stop guard
pub fn new() -> StopGuard {
StopGuard {
flag: Arc::new(AtomicBool::new(false))
}
}
}
impl Drop for StopGuard {
fn drop(&mut self) {
self.flag.store(true, Ordering::Relaxed)
}
}