From 19154cf8e1b4177c39812db67336b64ca5911055 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 1 Nov 2022 16:28:08 -0400 Subject: [PATCH] Move sc_tendermint to async sign --- substrate/tendermint/client/src/validators.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/substrate/tendermint/client/src/validators.rs b/substrate/tendermint/client/src/validators.rs index 9a198390..58fdde28 100644 --- a/substrate/tendermint/client/src/validators.rs +++ b/substrate/tendermint/client/src/validators.rs @@ -1,6 +1,8 @@ use core::{marker::PhantomData, ops::Deref}; use std::sync::{Arc, RwLock}; +use async_trait::async_trait; + use sp_application_crypto::{ RuntimePublic as PublicTrait, Pair as PairTrait, sr25519::{Public, Pair, Signature}, @@ -92,12 +94,13 @@ impl TendermintValidators { } } +#[async_trait] impl SignatureScheme for TendermintValidators { type ValidatorId = u16; type Signature = Signature; type AggregateSignature = Vec; - fn sign(&self, msg: &[u8]) -> Signature { + async fn sign(&self, msg: &[u8]) -> Signature { self.0.read().unwrap().keys.sign(msg) }