Use sign_with for signing grandpa's outgoing message (#6178)

* Use sign_with and stop using `Pair`

* PR feedback

* Remove clone

* Transfer ownership of public to sign_message

* Use Option

* Simplify code

* Fix error message

* Pass keystore as ref

* Pass keystore properly

* Fix tests
This commit is contained in:
Rakan Alhneiti
2020-06-09 09:39:30 +02:00
committed by GitHub
parent 65ba701f50
commit 2577dde3d9
11 changed files with 95 additions and 61 deletions
@@ -148,7 +148,7 @@ pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceEr
// if the node isn't actively participating in consensus then it doesn't
// need a keystore, regardless of which protocol we use below.
let keystore = if role.is_authority() {
Some(service.keystore())
Some(service.keystore() as sp_core::traits::BareCryptoStorePtr)
} else {
None
};