Ethstore optimizations (#6827) (#6844)

This commit is contained in:
Arkadiy Paronyan
2017-10-20 20:22:01 +02:00
committed by GitHub
parent 8f0eb3e192
commit d470773fec
5 changed files with 54 additions and 23 deletions

View File

@@ -269,7 +269,7 @@ impl AccountProvider {
/// Checks whether an account with a given address is present.
pub fn has_account(&self, address: Address) -> Result<bool, Error> {
Ok(self.accounts()?.iter().any(|&a| a == address))
Ok(self.sstore.account_ref(&address).is_ok() && !self.blacklisted_accounts.contains(&address))
}
/// Returns addresses of all accounts.