-
Notifications
You must be signed in to change notification settings - Fork 130
[NC-1968] Permissioning whitelist persistence. #763
Conversation
.../tech/pegasys/pantheon/tests/acceptance/dsl/condition/perm/WhiteListContainsKeyAndValue.java
Outdated
Show resolved
Hide resolved
...a/tech/pegasys/pantheon/tests/acceptance/permissioning/WhitelistPersistorAcceptanceTest.java
Outdated
Show resolved
Hide resolved
...sys/pantheon/ethereum/jsonrpc/internal/methods/permissioning/PermAddAccountsToWhitelist.java
Show resolved
Hide resolved
.../src/main/java/tech/pegasys/pantheon/ethereum/p2p/permissioning/NodeWhitelistController.java
Show resolved
Hide resolved
...issioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/WhitelistPersistor.java
Outdated
Show resolved
Hide resolved
.collect(Collectors.toList()); | ||
} | ||
|
||
Files.write( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it happen that the remove file.write succeeds but the add fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the PR with checks for this case. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR has been updated to include config file state verification, which verifies the before and after state and will (at least attempt to) revert to the before state if the operation fails.
bf89833
to
ba87c6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with the changes.
PR description
Implemented functionality to persist permissioning whitelists across restarts.
Fixed Issue(s)
Fixes #NC-1968