removed additional_params method (#10818)

This commit is contained in:
Marek Kotewicz
2019-06-29 15:31:15 +08:00
committed by David
parent c1b3d5fe1a
commit 8fc504eb1a
9 changed files with 10 additions and 48 deletions

View File

@@ -163,12 +163,7 @@ where
}
fn registry_address(&self) -> Result<Option<H160>> {
let reg = self.light_dispatch.client.engine().params().registrar;
if reg == Default::default() {
Ok(None)
} else {
Ok(Some(reg))
}
Ok(self.light_dispatch.client.engine().params().registrar)
}
fn rpc_settings(&self) -> Result<RpcSettings> {

View File

@@ -16,11 +16,10 @@
//! Parity-specific rpc implementation.
use std::sync::Arc;
use std::str::FromStr;
use std::collections::BTreeMap;
use crypto::DEFAULT_MAC;
use ethereum_types::{Address, H64, H160, H256, H512, U64, U256};
use ethereum_types::{H64, H160, H256, H512, U64, U256};
use ethcore::client::{BlockChainClient, StateClient, Call};
use ethcore::miner::{self, MinerService, FilterOptions};
use ethcore::snapshot::{SnapshotService, RestorationStatus};
@@ -165,12 +164,7 @@ impl<C, M, U, S> Parity for ParityClient<C, M, U> where
}
fn registry_address(&self) -> Result<Option<H160>> {
Ok(
self.client
.additional_params()
.get("registrar")
.and_then(|s| Address::from_str(s).ok())
)
Ok(self.client.registrar_address())
}
fn rpc_settings(&self) -> Result<RpcSettings> {