Merge pull request #4034 from maciejhirsz/mh-pwmsg
Better error messages for PoA chains, closes #4030
This commit is contained in:
@@ -150,6 +150,11 @@ impl AccountProvider {
|
||||
Ok(Address::from(address).into())
|
||||
}
|
||||
|
||||
/// 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))
|
||||
}
|
||||
|
||||
/// Returns addresses of all accounts.
|
||||
pub fn accounts(&self) -> Result<Vec<Address>, Error> {
|
||||
let accounts = self.sstore.accounts()?;
|
||||
|
||||
Reference in New Issue
Block a user