updated rpc helpers docs
This commit is contained in:
parent
ac3acdef71
commit
d87286c5c3
@ -14,6 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Test implementation of account provider.
|
||||
|
||||
use std::sync::RwLock;
|
||||
use std::collections::HashMap;
|
||||
use std::io;
|
||||
@ -42,6 +44,7 @@ impl TestAccount {
|
||||
/// Test account provider.
|
||||
pub struct TestAccountProvider {
|
||||
accounts: RwLock<HashMap<Address, TestAccount>>,
|
||||
/// Added accounts passwords.
|
||||
pub adds: RwLock<Vec<String>>,
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ pub struct TestExternalMiner {
|
||||
}
|
||||
|
||||
impl TestExternalMiner {
|
||||
/// Creates new external miner.
|
||||
pub fn new(hashrates: Arc<RwLock<HashMap<H256, U256>>>) -> Self {
|
||||
TestExternalMiner {
|
||||
hashrates: hashrates,
|
||||
|
@ -14,6 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Test implementation of miner service.
|
||||
|
||||
use util::{Address, H256, Bytes};
|
||||
use util::standard::*;
|
||||
use ethcore::error::Error;
|
||||
@ -22,8 +24,11 @@ use ethcore::block::ClosedBlock;
|
||||
use ethcore::transaction::SignedTransaction;
|
||||
use ethminer::{MinerService, MinerStatus, AccountDetails};
|
||||
|
||||
/// Test miner service.
|
||||
pub struct TestMinerService {
|
||||
/// Imported transactions.
|
||||
pub imported_transactions: RwLock<Vec<H256>>,
|
||||
/// Latest closed block.
|
||||
pub latest_closed_block: Mutex<Option<ClosedBlock>>,
|
||||
}
|
||||
|
||||
|
@ -14,15 +14,22 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Test implementation of SyncProvider.
|
||||
|
||||
use ethsync::{SyncProvider, SyncStatus, SyncState};
|
||||
use std::sync::{RwLock};
|
||||
|
||||
/// TestSyncProvider config.
|
||||
pub struct Config {
|
||||
/// Protocol version.
|
||||
pub protocol_version: u8,
|
||||
/// Number of peers.
|
||||
pub num_peers: usize,
|
||||
}
|
||||
|
||||
/// Test sync provider.
|
||||
pub struct TestSyncProvider {
|
||||
/// Sync status.
|
||||
pub status: RwLock<SyncStatus>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user