Merge branch 'master' into ethminer_crate

Conflicts:
	Cargo.toml
	rpc/Cargo.toml
	sync/Cargo.toml
This commit is contained in:
Tomasz Drwięga
2016-03-12 09:48:17 +01:00
28 changed files with 197 additions and 58 deletions

View File

@@ -22,20 +22,20 @@ use util::keys::store::*;
use util::Address;
/// Account management (personal) rpc implementation.
pub struct PersonalClient {
accounts: Weak<AccountProvider>,
pub struct PersonalClient<A> where A: AccountProvider {
accounts: Weak<A>,
}
impl PersonalClient {
impl<A> PersonalClient<A> where A: AccountProvider {
/// Creates new PersonalClient
pub fn new(store: &Arc<AccountProvider>) -> Self {
pub fn new(store: &Arc<A>) -> Self {
PersonalClient {
accounts: Arc::downgrade(store),
}
}
}
impl Personal for PersonalClient {
impl<A> Personal for PersonalClient<A> where A: AccountProvider + 'static {
fn accounts(&self, _: Params) -> Result<Value, Error> {
let store = take_weak!(self.accounts);
match store.accounts() {