Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Acc whitelist api #487

Merged
merged 10 commits into from
Jan 8, 2019
Merged

Conversation

lucassaldanha
Copy link
Contributor

PR description

Implemented Accounts whitelist JSON-RPC API (perm_addAccountsToWhitelist, perm_RemoveAccountsFromWhitelist, perm_GetAccountsWhitelist).

Summary:
• Implemented JSON-RPC methods.
• Refactored TransactionPool account whitelist validation to improve readability.
• Fixed JSON-RPC eth_sendRawTransaction response for sender not authorized.
• Implemented Account whitelisting acceptance tests (introducing heaps of DLS changes to accommodate this)

Copy link
Contributor

@mark-terry mark-terry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I've made a suggestion that's not essential for merging. 👍

public boolean useWhitelist() {
return (accountWhitelistController.isPresent()
&& accountWhitelistController.get().isAccountWhiteListSet());
return accountWhitelistController.map(c -> !c.contains(account)).orElse(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be simplified further to a noneMatch or anyMatch?

@lucassaldanha lucassaldanha merged commit 0a8f6cb into PegaSysEng:master Jan 8, 2019
@lucassaldanha lucassaldanha deleted the acc-whitelist-api branch January 8, 2019 03:37
Errorific pushed a commit to Errorific/pantheon that referenced this pull request Jan 8, 2019
* Implemented list/add/remove accounts from whitelist

* Including account whitelist methods in the JSON-RPC API

* Fixing json rpc response for eth_sendrawTransaction with account not authorized

* Refactoring TransactionPool account whitelist logic

* Acceptance test for accounts whitelist

* Errorprone

* Fixed account nonce tracking in ATs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants