RPC method for clearing the engine signer#10920
Conversation
|
It looks like @vkomenda signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
443825f to
64d6cb5
Compare
|
Please review. |
2851b0d to
74fcb11
Compare
dvdplm
left a comment
There was a problem hiding this comment.
Apologies for the late re-review. I think we're real close!
| fn set_author(&self, author: Author); | ||
|
|
||
| /// Clears the engine signer and stops signing. | ||
| fn clear_author(&self); |
There was a problem hiding this comment.
Do you think the same "trick" would work here too? I.e. avoid adding a new trait method and instead change set_author to take an Option<Author> instead?
There was a problem hiding this comment.
Done.
I made it a T: Into<Option<Author>>, so that you can pass in just an Author, and we don't have to update all the call sites.
Also, I added *self.signer.write() = None to MinerService::set_author, which seemed like an omission. Or am I misreading this?
There was a problem hiding this comment.
(And: Greetings from Solna! 🙂 🇸🇪)
74fcb11 to
58ddaee
Compare
|
@niklasad1 can you take a look at this as well please? |
niklasad1
left a comment
There was a problem hiding this comment.
LGTM, except the removed log in clique::set_signer
Add RPC method parity_clearEngineSigner Fixes #113
58ddaee to
869c3b3
Compare
|
Another test failure I can't reproduce locally. |
|
@afck Yeah, it's a CI issue. Restarted and it succeeded. |
e6715b1 to
2249974
Compare
Original commit messages: RPC method parity_clearEngineSigner Add RPC method parity_clearEngineSigner Fixes #113 corrected the return type of clear_author review comment responses and a rebase fix removed a spurrious warning moved clear_signer functionality to set_signer Merge clear_author into MinerService::set_author. Add trace logs to Clique::set_signer. Clique: Don't lock signer multiple times.
Original commit messages: RPC method parity_clearEngineSigner Add RPC method parity_clearEngineSigner Fixes #113 corrected the return type of clear_author review comment responses and a rebase fix removed a spurrious warning moved clear_signer functionality to set_signer Merge clear_author into MinerService::set_author. Add trace logs to Clique::set_signer. Clique: Don't lock signer multiple times.
This PR adds a new RPC method for clearing the engine signer value.
Original PR: poanetwork#114
See also gnosischain/posdao-test-setup#41 (comment)