Fix RPC errors. Implement geth-compatibility option to return correct pending nonce. (#4837)

This commit is contained in:
Tomasz Drwięga
2017-03-10 10:25:13 +01:00
committed by Gav Wood
parent 608c0dc613
commit 0ab0cb1173
8 changed files with 96 additions and 21 deletions

View File

@@ -263,7 +263,7 @@ impl Eth for EthClient {
let accounts = self.accounts
.note_dapp_used(dapp.clone())
.and_then(|_| self.accounts.dapp_addresses(dapp))
.map_err(|e| errors::internal("Could not fetch accounts.", e))
.map_err(|e| errors::account("Could not fetch accounts.", e))
.map(|accs| accs.into_iter().map(Into::<RpcH160>::into).collect());
future::done(accounts).boxed()

View File

@@ -87,7 +87,7 @@ impl Parity for ParityClient {
let dapp_accounts = store
.note_dapp_used(dapp.clone().into())
.and_then(|_| store.dapp_addresses(dapp.into()))
.map_err(|e| errors::internal("Could not fetch accounts.", e))?
.map_err(|e| errors::account("Could not fetch accounts.", e))?
.into_iter().collect::<HashSet<_>>();
let info = store.accounts_info().map_err(|e| errors::account("Could not fetch account info.", e))?;